[Bug 6422] grep and segfault

bugzilla at busybox.net bugzilla at busybox.net
Wed Aug 21 02:28:16 UTC 2013


https://bugs.busybox.net/show_bug.cgi?id=6422

--- Comment #7 from Arseniy <senik91 at mail.ru> 2013-08-21 02:28:40 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > The strace output you posted ends with:
> > > 
> > > ...
> > > lstat64("./proc/stclkrv_core", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
> > > open("./proc/stclkrv_core",
> > > O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 5
> > > getdents64(0x5, 0x5b37a0, 0x8000, 0x800000) = 136
> > > lstat64("./proc/stclkrv_core/odf", {st_mode=S_IFREG|0444, st_size=37, ...}) = 0
> > > open("./proc/stclkrv_core/odf", O_RDONLY|O_LARGEFILE) = 6
> > > fstat64(6, {st_mode=S_IFREG|0444, st_size=37, ...}) = 0
> > > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> > > 0x29558000
> > > read(6,  <unfinished ...>
> > > 
> > > 
> > > IOW: there is no segfault in strace output. grep is just stuck trying to read
> > > some /proc file.
> > 
> > it is sigsegv, because after last line read(6,  <unfinished ...> strace prints
> > "killed by SISEGV", sorry, i didn't copy it earlier
> 
> This isn't how SIGSEGV is shown in strace output. It should look like this:
> 
> ...
> last_syscall(args)    = result
> --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_USER, si_pid=22713, si_uid=0} ---
> +++ killed by SIGSEGV +++

Ok:
...
lstat64("./proc/stclkrv_core", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("./proc/stclkrv_core",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 5
getdents64(0x5, 0x5b3240, 0x8000, 0x800000) = 136
lstat64("./proc/stclkrv_core/odf", {st_mode=S_IFREG|0444, st_size=37, ...}) = 0
open("./proc/stclkrv_core/odf", O_RDONLY|O_LARGEFILE) = 6
fstat64(6, {st_mode=S_IFREG|0444, st_size=37, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x29558000
read(6,  <unfinished ...>
+++ killed by SIGSEGV +++

So.. it means that there is bug in strace?:)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list