ksh crash

Bug #878276 reported by frankster
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ksh (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

ksh is crashing when I run a script. I'm not sure if this is the same cause as 638867 so I am reporting it separately. A typical callstack is:
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004e867b in sfsync (f=0x790ce0) at /home/frankster/ksh/ksh-93u/src/lib/libast/sfio/sfsync.c:117
117 (void)(*f->disc->exceptf)(f,SF_SYNC,(Void_t*)((int)1),f->disc);
(gdb) where
#0 0x00000000004e867b in sfsync (f=0x790ce0) at /home/frankster/ksh/ksh-93u/src/lib/libast/sfio/sfsync.c:117
#1 0x000000000042add6 in sh_iosave (shp=0x7930a0, origfd=0, oldtop=0, name=0x0) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/io.c:1634
#2 0x0000000000466f40 in sh_exec (t=0xd7ceb0, flags=516) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:1723
#3 0x0000000000467aa9 in sh_exec (t=0xd7ceb0, flags=516) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:1948
#4 0x0000000000467ba2 in sh_exec (t=0xd7d1d0, flags=516) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:1969
#5 0x0000000000468e7c in sh_exec (t=0xd7c9a0, flags=516) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:2298
#6 0x0000000000467bd6 in sh_exec (t=0xd7c9a0, flags=516) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:1973
#7 0x000000000046832c in sh_exec (t=0xd7c1d0, flags=4) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:2116
#8 0x0000000000467bd6 in sh_exec (t=0xd7c1d0, flags=4) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:1973
#9 0x0000000000468eac in sh_exec (t=0xd7bde0, flags=4) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/xec.c:2300
#10 0x00000000004080d8 in exfile ()
#11 0x0000000000407517 in sh_main ()
#12 0x0000000000406819 in main (argc=3, argv=0x7fff38a4c398) at /home/frankster/ksh/ksh-93u/src/cmd/ksh93/sh/pmain.c:45
(gdb)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: ksh 93u-1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Wed Oct 19 16:20:23 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB
 SHELL=/bin/bash
SourcePackage: ksh
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (4 days ago)

Revision history for this message
frankster (wtfrank) wrote :
Revision history for this message
frankster (wtfrank) wrote :

One thing that's odd about it is that if I run the script that causes the crash on its own, its fine. However when this script is run in sequence from another script then the crash reliably occurs.

Revision history for this message
Eliah Kagan (degeneracypressure) wrote :

Can you provide the script that triggers this bug when called from another script, and also the script (or a simplified sample script) that calls it? Please attach these files to the bug. After attaching them at https://bugs.launchpad.net/ubuntu/+source/ksh/+bug/878276, please feel free to change this bug's status back from Incomplete to New.

Changed in ksh (Ubuntu):
status: New → Incomplete
Revision history for this message
frankster (wtfrank) wrote :

Its not really possible to attach the script I'm afraid as its used in the build system of my employer's product and additionally the script processes source code from my employer's product so would probably also require the source files to be uploaded as well.

It might be possible to simplify the script.

Revision history for this message
Eliah Kagan (degeneracypressure) wrote :

A simplified script (preferably, the simplest possible script that reliably produces the problem) would be even better.

Also, I'm looking at your stack trace again, and I am wondering if this bug was really produced with ksh as it is packaged in Ubuntu, or if you were running upstream ksh built and installed in your home directory. The included Apport information indicates that ksh 93u-1 is installed globally from the official Oneiric package. But is that actually the ksh you're running?

Revision history for this message
frankster (wtfrank) wrote :

I rebuilt the package from ubuntu source with debug symbols to get a decent stack trace.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ksh (Ubuntu) because there has been no activity for 60 days.]

Changed in ksh (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.