Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can check to see if any running process are using any stale libraries pretty easily:

sudo lsof | grep lib | grep DEL

You can then either reload those processes manually, or just bounce the box if that's easier.



There's also a rare chance that a program is statically linked, in which case upgrading glibc won't help, the program would need to be recompiled.


Yeah, that's a good point, and definitely worth mentioning, but obviously rebooting isn't going to help in that case either. The parent was asking about how they would know if they need to reboot or not.


It is nearly impossible to statically link glibc.


... with nss-modules being a major culprit, ironically... (on which gethostbyname relies greatly)...


[deleted]


You're testing what happens when you delete a file for which an open file descriptor exists. On Linux, a shared library will normally be memory-mapped but will not have a corresponding file descriptor. So lsof will show DEL, not (deleted).

I wouldn't normally nitpick about something like this, but if people follow your advice they might incorrectly think they don't need to reboot.


You can see that the removed file gets a (deleted) in the 'NAME' column but not DEL in the 'TYPE'.

Maybe you have a cut-and-paste error? The before and after look the same to me, no "(deleted)" to be seen.


Use contrl-F to search, it got clipped off the right-hand side by HN's raw-mode display.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: