Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

fix: color asan option#2

Merged
krlmlr merged 3 commits intomainfrom
r-devel
Jun 8, 2023
Merged

fix: color asan option#2
krlmlr merged 3 commits intomainfrom
r-devel

Conversation

@Antonov548
Copy link
Copy Markdown
Collaborator

No description provided.

@Antonov548 Antonov548 requested a review from krlmlr June 2, 2023 10:45
@Antonov548
Copy link
Copy Markdown
Collaborator Author

Antonov548 commented Jun 2, 2023

@krlmlr version of RDcsan in the docker which doesn't show warnings related to DWARF. readelf shows correct debug symbols without warnings.


But in the tests there is still not callstack from igraph.so. Wondering if it could be related to the fact that igraph.so is not linked to asan library.

@Antonov548
Copy link
Copy Markdown
Collaborator Author

Antonov548 commented Jun 3, 2023

@krlmlr I tried set of different options to fix this issue.

Sanitaizer shows this error now: LLVMSymbolizer: error reading file: No such file or directory.

Also when it shows call stack, it shows in which library memory leack was detected: #1 0x7f66aa7f84f6 (/tmp/RtmpGG6vpr/pkgload136bb4f200ded/igraph.so+0x2734f6) (BuildId: 9b573d30c53e43851d040ffb8f6814630743775c)

I don't know much about this. But have felling that R make tmp copy of dynamic library igraph.so and load it in the process. At the end of R process Sanitazer makes report and try to symbolize the binary it doesn't exists anymore, R delete it from tmp. It's just theory, but I would like to hear your thoughts on this.


It's more about from where R takes dynamic library? Why load_all() only works for Szabolcs? etc. I will try to move in this direction.

@krlmlr
Copy link
Copy Markdown
Owner

krlmlr commented Jun 4, 2023

Not sure, let's discuss on Tuesday.

@krlmlr
Copy link
Copy Markdown
Owner

krlmlr commented Jun 5, 2023

Thanks.

I think we now understand the issue regarding the source reference: igraph/rigraph#813 (comment) .

Regarding the readelf warnings: what is the crucial change? Do we need:

export CFLAGS="-g -fno-omit-frame-pointer -Og -gdwarf32 -gdwarf-3"
export CXXFLAGS="-g -fno-omit-frame-pointer -Og -gdwarf32 -gdwarf-3"

? Anything else?

@Antonov548
Copy link
Copy Markdown
Collaborator Author

Antonov548 commented Jun 5, 2023

Regarding the readelf warnings: what is the crucial change? Do we need:

Nice👍

To remove warning we need to use another version of dwarf, since by default it choose version: 5 to compile igraph.so. As I understood 5 is experimental. -gdwarf-4 also should be fine. I tried it.

@krlmlr
Copy link
Copy Markdown
Owner

krlmlr commented Jun 6, 2023

Can you please adapt https://github.com/cynkra/r-debug as needed?

@krlmlr
Copy link
Copy Markdown
Owner

krlmlr commented Jun 6, 2023

Please work on the "latest" branch, not "main".

@Antonov548 Antonov548 changed the title R-devel fix: color asan option Jun 6, 2023
@Antonov548 Antonov548 changed the title fix: color asan option fix: 'color' asan option Jun 6, 2023
@Antonov548 Antonov548 changed the title fix: 'color' asan option fix: color asan option Jun 6, 2023
@Antonov548
Copy link
Copy Markdown
Collaborator Author

@krlmlr krlmlr merged commit bcfc179 into main Jun 8, 2023
@krlmlr krlmlr deleted the r-devel branch June 8, 2023 12:52
@krlmlr
Copy link
Copy Markdown
Owner

krlmlr commented Jun 8, 2023

Nice, thanks! Can we base this image on https://github.com/cynkra/r-debug/tree/latest for now?

@krlmlr
Copy link
Copy Markdown
Owner

krlmlr commented Jun 8, 2023

Can you please test this locally and then push the change straight to the main branch?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants