Bugzilla – Bug 1215399
logtail segfaults if it doesn't have permissions to write the *.offset file
Last modified: 2024-03-26 18:14:50 UTC
I get lots of logtail segfaults reported in /var/log/messages: Sep 15 21:00:03 da4 kernel: logtail[26615]: segfault at 0 ip 00007f0d0439d144 sp 00007ffc00eea5e0 error 4 in libc-2.31.so[7f0d04318000+1e8000] Sep 15 21:00:03 da4 kernel: Code: 84 00 00 00 00 00 e8 b9 c3 00 00 e9 09 ff ff ff e8 af 45 0a 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 54 55 53 <8b> 07 48 89 fb f6 c4 20 0f 85 e6 00 00 00 89 c2 81 e2 00 80 00 00 Sep 15 21:00:03 da4 kernel: logtail[26618]: segfault at 0 ip 00007fde45fda144 sp 00007ffcfb94b450 error 4 in libc-2.31.so[7fde45f55000+1e8000] Sep 15 21:00:03 da4 kernel: Code: 84 00 00 00 00 00 e8 b9 c3 00 00 e9 09 ff ff ff e8 af 45 0a 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 54 55 53 <8b> 07 48 89 fb f6 c4 20 0f 85 e6 00 00 00 89 c2 81 e2 00 80 00 00 The "segfault" line slightly differs every time, the "Code:" line is always exactly the same. The issue seems to be triggered by munin which calls logtail /etc/hosts but runs as user "munin" and therefore doesn't have permissions to write /etc/hosts.offset Reproducer: run logtail /etc/hosts as non-root: # logtail /etc/hosts [... content of /etc/hosts ...] File /etc/hosts.offset cannot be created. Check your permissions. Segmentation fault (core dumped) I'll open a separate bug for munin (which should specify a writeable path for the *.offset file) - but please the logtail segfault nevertheless ;-)
The package comes from Packagehub, I assign it to packagehub team to take a look at it, thanks.
Thanks, but - can you please make it public again, instead of restricting it to "novellonly"?
I can reproduce the bug using the latest logtail in openSUSE:Factory Moving the bug there and resetting to default assignee.
@Peter, @Lars: Any ideas what to do about this segfault?