Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2011 22:21:41 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        Alexander Best <arundel@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: truss crashing process
Message-ID:  <20110727192141.GB17489@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110727163549.GD6562@dan.emsphone.com>
References:  <20110727003004.GA61713@freebsd.org> <20110727163549.GD6562@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--IMEGvgzHT1iQOmnS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 27, 2011 at 11:35:49AM -0500, Dan Nelson wrote:
> In the last episode (Jul 27), Alexander Best said:
> > hi there,
> >=20
> > i was trying to attach truss to chromium via
> >=20
> > 'truss -p 18445' and got:
> >=20
> > [...]
> > kevent(26,{},0,{0x1b,EVFILT_READ,0x0,0,0x1,0x44cb600 0x0,0x0,0x0,0,0x0,=
0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0=
x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,=
0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0=
x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x=
0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0=
x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x=
0,0x0,0,0x0,0x0 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0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0=
,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 =
0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0=
x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,=
0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0=
x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,=
0x0,0x0 0x0,0x0,!
>  0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,0x0,0x0,0,0x0,0x0 0x0,!
>  0x0,0x0,
> > -- UNKNOWN SYSCALL -14720592 --
> > write(-14720976,0x8080808080808000,0)		 =3D 41 (0x29)
> > select(94,0x6acd,{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 =
21 22 23 24 25 26 27 28 29 30 31 40 41 42 43 44 45 46 70 71 72 73 76 77 78 =
79 80 81 82 84 87 88 91},0x1,{0.85048848 }) =3D 73 (0x49)
> > -- UNKNOWN SYSCALL 303120384 --
> > #94(0x0,0x0,0x5e,0xb6cd600,0x83ed780,0x3dae410)	 =3D 189 (0xbd)
> > truss: Cannot malloc -14740096 bytes for fd_set array: Cannot allocate =
memory
>=20
> Invalid syscalls numbers like that usually mean that truss has attached t=
o a
> process in the middle of a syscall.  The ptrace API fires the same event =
for
> syscall enter and exit, so if truss is expecting an enter and gets an exi=
t,
> you get a mangled syscall number and eventually truss will coredump trying
> to decode incorrect data.
>=20
> Try applying the patch at https://www.evoy.net/FreeBSD/truss.diff , which
> amongst other things, fixes this problem.  If you just want the syscall f=
ix,
> search the diff for "50-50 chance" and manually patch that if(){} block in
> your source.

We have PL_FLAG_SCE/PL_FLAG_SCX for some time. I planned to update truss
to use the flags, as well as to take advantage of PL_FLAG_FORKED to close
the race where truss can miss the forked child.

Unfortunately, the project stalled.

--IMEGvgzHT1iQOmnS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk4wZUUACgkQC3+MBN1Mb4iuxwCfXGBbDEJbOEGSXLEzPNN+XKqS
nI0AnRA36KMbUmgYXZb41t/cwZNaRc8B
=rYU4
-----END PGP SIGNATURE-----

--IMEGvgzHT1iQOmnS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110727192141.GB17489>