Hullo list, Are there any existing known issues surrounding the resolution of symbols inside dlopened modules when a process has dropped privileges using setuid/setgid? I've had terrible problems trying to debug a server daemon which is started as root (so that it can bind to privileged ports), then drops to an unprivileged user before loading several plugins using dlopen; primarily, that whenever a backtrace involves code inside a plugin, I just get "???" instead of symbol names for functions inside the plugins. The shared object files do have debug information, and I have taken care to disable dlclose in debug builds of the daemon so that the symbols aren't unloaded on exit. In fact the same problem applies for errors generated during execution, not just when outputting leak info on exit. By chance, I noticed that if I disable the daemon's privilege dropping, the symbol information suddenly becomes visible. Turning on the verbose flag, I can clearly see messages such as the following when dlopen happens (names changed to protect the innocent):
--11038-- Reading syms from /usr/lib/hungrydaemon/bacon.so (0x731a000) When privilege dropping is enabled, these messages do not appear, but no errors or alternative output seem to appear in their place. On a semi-related note, I get a lot of reports of invalid reads of size 4 inside dlopen/dlsym. I'm using libltdl to perform module loading, and it seems to work (it's not the plugin loading I want to debug, rather the functionality of the plugins themselves); should it be safe to just suppress these errors? Regards -- Philip Allison Senior Developer philip.alli...@smoothwall.net Smoothwall Ltd 1 John Charles Way, Leeds, LS12 6QA United Kingdom Telephone: USA: 1 800 959 3760 Europe: +44 (0) 8701 999500 http://www.smoothwall.net Smoothwall Limited is registered in England, Company Number: 4298247. This email and any attachments transmitted with it are confidential to the intended recipient(s) and may not be communicated to any other person or published by any means without the permission of Smoothwall Limited. Any opinions stated in this message are solely those of the author.
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users