[Bug 1062412] Re: strace crashed with SIGSEGV in __GI_raise()

yzp15 1062412 at bugs.launchpad.net
Sun May 20 00:16:41 UTC 2018


> Note that the CUPS version which I had run under strace had a segfault
bug, but this should not make strace crash.

Actually, there is a code in strace.c (main -> terminate() ) to raise the signal which killed the traced process. Strace does it exactly before exit
https://github.com/strace/strace/blob/1d98b287a4cb6901d369d78126d481508f9e35ef/strace.c#L2655

	if (exit_code > 0xff) {
		...
		/* Child was killed by a signal, mimic that.  */
		exit_code &= 0xff;
		signal(exit_code, SIG_DFL);
		...
		raise(exit_code);
	...
	exit(exit_code);

Code was added in 2008-09-29 commit
https://github.com/strace/strace/commit/a68096576afc07e51d33b49c432d658b27a7f13c
> (main): Exit/kill ourself with straced child's exitcode/signal.

Same for other reports in
https://errors.ubuntu.com/?package=strace&period=year like Bug #1430741

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to strace in Ubuntu.
https://bugs.launchpad.net/bugs/1062412

Title:
  strace crashed with SIGSEGV in __GI_raise()

Status in strace package in Ubuntu:
  Confirmed

Bug description:
  Happened when running

  sudo strace /usr/sbin/cupsd -f

  ProblemType: Crash
  DistroRelease: Ubuntu 12.10
  Package: strace 4.5.20-2.3ubuntu2
  ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
  Uname: Linux 3.5.0-16-generic x86_64
  ApportVersion: 2.6.1-0ubuntu1
  Architecture: amd64
  Date: Fri Oct  5 18:33:58 2012
  ExecutablePath: /usr/bin/strace
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120724.2)
  ProcCmdline: strace /usr/sbin/cupsd -f
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  Signal: 11
  SourcePackage: strace
  StacktraceTop:
   __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
   ?? ()
   __libc_start_main (main=0x4020f0, argc=3, ubp_av=0x7fff38beb5e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff38beb5d8) at libc-start.c:226
   ?? ()
   ?? ()
  Title: strace crashed with SIGSEGV in __GI_raise()
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/strace/+bug/1062412/+subscriptions



More information about the foundations-bugs mailing list