Hello, while trying to get the gnash CVS version to work I noticed that on my system (FreeBSD 6.0-RELEASE) truss obviously has problems tracing firefox: truss prints somewhat "random" error messages and traces only some of the system calls firefox makes (opening a local file doesn't show up, for example). The output looks like that (I can provide the truss log if somebody is interested): jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: PIOCWAIT top of loop: Input/output error truss: get_struct 0x0: Bad address jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: Cannot malloc 1081891232 bytes for pollfd array: Cannot allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: cannot open /proc/0/mem: No such file or directory truss: cannot open /proc/0/mem: No such file or directory truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: PIOCWAIT top of loop: Input/output error truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: cannot open /proc/0/mem: No such file or directory truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: cannot open /proc/0/mem: No such file or directory truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox truss: PIOCWAIT top of loop: Input/output error truss: get_struct 0x0: Bad address jonas@nobby:/tmp$ A similar Problem also occurs with KDE applications, but only if the application needs to start kdeinit (i.e. if other KDE applications are already running there is no such problem): jonas@nobby:/usr/sbin$ truss -f -o /tmp/ggg kedit truss: PIOCWAIT top of loop: Input/output error truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: PIOCWAIT top of loop: Input/output error truss: PIOCCONT: Input/output error truss: PIOCWAIT top of loop: Input/output error kbuildsycoca running... DCOP Cleaning up dead connections. jonas@nobby:/usr/sbin$ Other applications I tested (xedit, bash) seem to work fine. Can someone else also reproduce this problem/is this a known bug or is just something broken on my system? If you need more details please let me know. Jonas
Jonas Wolz <jonas.wolz@freenet.de> wrote:> while trying to get the gnash CVS version to work I noticed that on > my system (FreeBSD 6.0-RELEASE) truss obviously has problems tracing > firefox: truss prints somewhat "random" error messages and traces > only some of the system calls firefox makes (opening a local file > doesn't show up, for example). > > The output looks like that (I can provide the truss log if somebody > is interested): > jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: PIOCWAIT top of loop: Input/output error > truss: get_struct 0x0: Bad address > jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: Cannot malloc 1081891232 bytes for pollfd array: Cannot > allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: cannot open /proc/0/mem: No such file or directory > truss: cannot open /proc/0/mem: No such file or directory > truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot > allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: PIOCWAIT top of loop: Input/output error > truss: PIOCCONT: Input/output error > truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot > allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: PIOCWAIT top of loop: Input/output error > truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot > allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: cannot open /proc/0/mem: No such file or directory > truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot > allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: PIOCWAIT top of loop: Input/output error > truss: PIOCCONT: Input/output error > truss: cannot open /proc/0/mem: No such file or directory > truss: Cannot malloc 1162889024 bytes for pollfd array: Cannot > allocate memory jonas@nobby:/tmp$ truss -f -o ff.log firefox > truss: PIOCWAIT top of loop: Input/output error > truss: get_struct 0x0: Bad address > jonas@nobby:/tmp$> Can someone else also reproduce this problem/is this a known bug or > is just something broken on my system? > If you need more details please let me know.I can't reproduce exactly the same problem on FreeBSD TP51.local 6.1-RC FreeBSD 6.1-RC #1: Sun Apr 9 20:07:42 CEST 2006 but I get a different problem with truss and Firefox. If I run truss -f firefox it seems to get stuck after a while. 1274: mmap(0x0,36864,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0) = 689876992 (0 1274: kse_release(0x8064fa0) = 0 (0x0) 1274: kse_release(0x8064fa0) = 0 (0x0) 1274: kse_release(0x8064fac) = 0 (0x0) 1274: kse_release(0x8064fa0) = 383 (0x17f) 1274: kse_release(0x8064fa0) = 383 (0x17f) 1274: kse_release(0x8064fa0) = 0 (0x0) 1274: kse_release(0x8064fa0) = 383 (0x17f) 1274: kse_release(0x8064fa0) = 383 (0x17f) 1274: kse_release(0x8064fa0) = 0 (0x0) ^C 1259: wait4(0xffffffff,0xbfbfe9d8,0x2,0x0) ERR#4 'Interrupted system call' 1266: wait4(0xffffffff,0xbfbfe728,0x2,0x0) ERR#4 'Interrupted system call' 1274: kse_release(0x8064fa0) = 383 (0x17f) truss firefox seems to work. If I attach truss to a running Firefox I get: fk@TP51 ~ $truss -f -p 1440 1440: (null)() = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) 1440: kse_release(0x8064fac) = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) 1440: kse_release(0x8064fa0) = 0 (0x0) truss: Cannot malloc -67210816 bytes for pollfd array: Cannot allocate memory Fabian -- http://www.fabiankeil.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060410/5368edc4/signature.pgp
Am Montag, 10. April 2006 11:45 schrieb Jonas Wolz:> Other applications I tested (xedit, bash) seem to work fine.I've made some more tests and it seems to me that the "fork following" feature (-f switch) of truss obviously is buggy. Even the following simple shell script sometimes (in about a third of the tests) provokes the bug: -- begin test.sh #!/bin/sh /bin/echo Test /bin/echo Test -- end test.sh If I call "truss -f sh test.sh" I get errors when execve() is called to start /bin/echo, for example: (56179 is the first /bin/echo (started without error), 56178 is /bin/sh) 56179: writev(0x1,0x804b030,0x2) = 5 (0x5) 56179: exit(0x0) process exit, rval = 0 56178: wait4(0xffffffff,0xbfbfde98,0x2,0x0) = 56179 (0xdb73) 56178: fork() = 56181 (0xdb75) 56178: getpgrp() = 56177 (0xdb71) 56181: close(10) = 0 (0x0) 56181: execve("/bin/echo",<missing argument>,<missing argument>) truss: PIOCWAIT top of loop: Input/output error 56181: execve("/bin/echo",<missing argument>,<missing argument>) = 0 (0x0) 56181: mmap(0x0,3600,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) = 671539200 (0x2806e000) 56181: munmap(0x2806e000,0xe10) = 0 (0x0) 56181: __sysctl(0xbfbfded8,0x2,0x2806aa18,0xbfbfded4,0x0,0x0) = 0 (0x0) I also tested the script with the 6.1-BETA4 Boot-CD. The bug seems only to be triggered on the *first run* of the script there, but it leaves 3 zombie processes per run behind (even if no error message is shown). Jonas