Bug 166248 - base sendmail dies of signal 11 on freebsd in a virtualbox guest
Summary: base sendmail dies of signal 11 on freebsd in a virtualbox guest
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-19 15:20 UTC by g1pi
Modified: 2020-08-01 09:54 UTC (History)
1 user (show)

See Also:


Attachments
kdump.qemu.txt.gz (12.54 KB, application/octet-stream)
2012-03-29 14:57 UTC, g1pi
no flags Details
kdump.vbox.txt.gz (1.94 KB, application/octet-stream)
2012-03-29 14:57 UTC, g1pi
no flags Details
ktrace.qemu.out.gz (55.70 KB, application/octet-stream)
2012-03-29 14:57 UTC, g1pi
no flags Details
ktrace.vbox.out.gz (5.03 KB, application/octet-stream)
2012-03-29 14:57 UTC, g1pi
no flags Details
sendmail-g-O2.stack.txt.gz (712 bytes, application/octet-stream)
2012-03-29 14:57 UTC, g1pi
no flags Details
kdump.qemu.txt.gz.uu (17.32 KB, text/plain; charset=us-ascii)
2012-03-29 17:54 UTC, g1pi
no flags Details
kdump.vbox.txt.gz.uu (2.71 KB, text/plain; charset=us-ascii)
2012-03-29 17:54 UTC, g1pi
no flags Details
ktrace.qemu.out.gz.uu (76.78 KB, text/plain; charset=us-ascii)
2012-03-29 17:54 UTC, g1pi
no flags Details
ktrace.vbox.out.gz.uu (6.97 KB, text/plain; charset=us-ascii)
2012-03-29 17:54 UTC, g1pi
no flags Details
sendmail-g-O2.stack.txt.gz.uu (1.00 KB, text/plain; charset=us-ascii)
2012-03-29 17:54 UTC, g1pi
no flags Details
kdump.qemu.txt (201.78 KB, text/plain; charset=us-ascii)
2012-03-29 18:27 UTC, g1pi
no flags Details
kdump.vbox.txt (16.55 KB, text/plain; charset=us-ascii)
2012-03-29 18:27 UTC, g1pi
no flags Details
sendmail-g-O2.stack.txt (2.43 KB, text/plain; charset=us-ascii)
2012-03-29 18:27 UTC, g1pi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description g1pi 2012-03-19 15:20:16 UTC
On a freshly installed FreeBSD 8.2-RELEASE running in a virtual machine, I cannot send mail to localhost, because sendmail always dies with signal 11.

I know that VirtualBox doesn't support FreeBSD as a guest, but I find strange that sendmail crashes while other executables work fine, and I could successfully build some ports.  If I run the same FreeBSD image in QEMU instead of VirtualBox, sendmail works.

guest operating system: freebsd 8.2 32-bit
hypervisor: virtualbox 4.1.10
guest system: 1 virtual cpu
              256M RAM
              256M swap
              2048M root fs
host operating system: debian linux 6.0 32-bit
host system: Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
             2 GB RAM
             Hardware Virtualization disabled by BIOS 

# pciconf -lv
hostb0@pci0:0:0:0:      class=0x060000 card=0x00000000 chip=0x12378086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82440/1FX 440FX (Natoma) System Controller'
    class      = bridge
    subclass   = HOST-PCI
isab0@pci0:0:1:0:       class=0x060100 card=0x00000000 chip=0x70008086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'PIIX3 PCI-to-ISA Bridge (Triton II) (82371SB)'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:1:1:     class=0x01018a card=0x00000000 chip=0x71118086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'PIIX4/4E/4M IDE Controller (82371AB/EB/MB)'
    class      = mass storage
    subclass   = ATA
vgapci0@pci0:0:2:0:     class=0x030000 card=0x00000000 chip=0xbeef80ee rev=0x00 hdr=0x00
    vendor     = 'InnoTek Systemberatung GmbH'
    device     = 'VirtualBox Graphics Adapter'
    class      = display
    subclass   = VGA
em0@pci0:0:3:0: class=0x020000 card=0x001e8086 chip=0x100e8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Gigabit Ethernet Controller (82540EM)'
    class      = network
    subclass   = ethernet
none0@pci0:0:4:0:       class=0x088000 card=0x00000000 chip=0xcafe80ee rev=0x00 hdr=0x00
    vendor     = 'InnoTek Systemberatung GmbH'
    device     = 'VirtualBox Guest Service'
    class      = base peripheral
none1@pci0:0:7:0:       class=0x068000 card=0x00000000 chip=0x71138086 rev=0x08 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'PIIX4/4E/4M Power Management Controller (82371AB/EB/MB)'
    class      = bridge
em1@pci0:0:8:0: class=0x020000 card=0x001e8086 chip=0x100e8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Gigabit Ethernet Controller (82540EM)'
    class      = network
    subclass   = ethernet

How-To-Repeat: as a non privileged user, issue the command:
$ echo test | mail myuser

myuser's mailbox doesn't change, and "dmesg" shows: 
..
Timecounter "TSC" frequency 2385140159 Hz quality 800
Timecounters tick every 10.000 msec
ad0: 2304MB <VBOX HARDDISK 1.0> at ata0-master UDMA33 
acd0: DVDROM <VBOX CD-ROM/1.0> at ata1-master UDMA33 
Trying to mount root from ufs:/dev/ad0s1a
pid 988 (sendmail), uid 0: exited on signal 11
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-03-26 06:54:47 UTC
Responsible Changed
From-To: freebsd-bugs->vbox

reassign from misc.
Comment 2 Bernhard Froehlich freebsd_committer freebsd_triage 2012-03-26 13:17:09 UTC
It looks like a bug in sendmail so could you please obtain a stacktrace 
from the failing sendmail?

http://www.freebsd.org/doc/en/books/developers-handbook/debugging.html

-- 
Bernhard Froehlich
http://www.bluelife.at/
Comment 3 g1pi 2012-03-29 14:57:58 UTC
On Mon, Mar 26, 2012 at 02:17:09PM +0200, Bernhard Froehlich wrote:
> It looks like a bug in sendmail so could you please obtain a
> stacktrace from the failing sendmail?
> [...]

Since I succesfully ran several world builds in virtualbox, I agree with
Bernhard: looks like a bug in sendmail.

I am afraid the stack trace (sendmail-g-O2.stack.txt) is not very
informative.

The crash happens repeatably in the call hosts_ctl() at line 4032 of
contrib/sendmail/src/conf.c, which I verified by short-cutting through
the call.  Unfortunately, I could not dig deeper, because if I rebuild
also libwrap with "-g" sendmail doesn't crash anymore.

A quick comparison of ktraces taken under virtualbox and qemu (binaries
ktrace.{vbox,qemu}.out, decoded as kdump.{vbox,qemu}.txt) shows signs
of memory corruption: the call
    open("/etc/hosts.allow", ...) at kdump.qemu.txt:263
becomes
    open(0x57e58955, ...) at kdump.vbox.txt:280

Rebuilding sendmail with -O or -O0 instead of -O2 makes the program
work correctly.
Comment 4 g1pi 2012-03-29 17:54:51 UTC
I managed to garble the attachments.  Trying to resend them uuencoded.
Comment 5 g1pi 2012-03-29 18:27:29 UTC
third attempt... GNATS hates me.

hope someone can clean up, removing previous messages.
Comment 6 Bernhard Froehlich freebsd_committer freebsd_triage 2012-03-30 08:49:48 UTC
Responsible Changed
From-To: vbox->dougb

This looks like a sendmail problem so I hope dougb has an idea.
Comment 7 Doug Barton freebsd_committer freebsd_triage 2012-03-30 20:49:02 UTC
Responsible Changed
From-To: dougb->freebsd-ports


I have no connection to sendmail. You probably want to ask gshapiro.
Comment 8 Mark Linimon freebsd_committer freebsd_triage 2012-03-31 00:04:27 UTC
Responsible Changed
From-To: freebsd-ports->freebsd-ports-bugs

Canonicalize assignment.
Comment 9 Edwin Groothuis freebsd_committer freebsd_triage 2012-05-27 21:20:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 10 Dirk Meyer freebsd_committer freebsd_triage 2012-06-02 09:08:51 UTC
State Changed
From-To: open->feedback


Does this problem exist with sendmail from ports too? 
Do you have any milters running?
Comment 11 g1pi 2012-06-04 10:11:56 UTC
So far, I've not seen crashes of the port version of sendmail.
However, I'd not draw conclusions yet, given that the behaviour is not
deterministic, and even the "main" sendmail works, in a tiny minority
of cases.

I have no milters.

Regards,
	g.
Comment 12 Dirk Meyer freebsd_committer freebsd_triage 2012-06-15 22:16:39 UTC
State Changed
From-To: feedback->open


feedback received. 



Comment 13 Dirk Meyer freebsd_committer freebsd_triage 2012-06-15 22:16:39 UTC
Responsible Changed
From-To: dinoex->freebsd-bugs


port is not affected.
Comment 14 Torfinn Ingolfsen 2013-06-01 11:32:48 UTC
FWIW, I suddenly have the same problem on a virtual machine running FreeBSD 8.3-stable. It has been running without trouble
for a long time  (it was upgraded to 8.3-stable about a year ago). From /var/log/messages:

May 31 07:40:36 kg-v5 su: tingo to root on /dev/pts/0
Jun  1 03:01:49 kg-v5 kernel: pid 3029 (sendmail), uid 0: exited on signal 11
Jun  1 03:01:49 kg-v5 kernel: pid 3078 (sendmail), uid 0: exited on signal 11
Jun  1 03:01:49 kg-v5 kernel: pid 3081 (sendmail), uid 0: exited on signal 11
Jun  1 03:27:56 kg-v5 kernel: pid 3118 (sendmail), uid 0: exited on signal 11
Jun  1 03:57:57 kg-v5 kernel: pid 3171 (sendmail), uid 0: exited on signal 11

The guest machine has 512 MB RAM.
Almost a gig of swap:
root@kg-v5# swapinfo -h
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b       1006400       0B     982M     0%
Guest operating system:
root@kg-v5# uname -a
FreeBSD kg-v5.kg4.no 8.3-STABLE FreeBSD 8.3-STABLE #0: Wed May  2 00:12:29 CEST 2012
     root@kg-v5.kg4.no:/usr/obj/usr/src/sys/GENERIC  i386
The disk layout is this:
root@kg-v5# gpart show ad0
=>      63  41942977  ad0  MBR  (20G)
        63  41942817    1  freebsd  [active]  (20G)
  41942880       160       - free -  (80k)

root@kg-v5# gpart show ad1
=>      34  61439933  ad1  GPT  (29G)
        34  61439933    1  freebsd-ufs  (29G)

root@kg-v5# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    989M    354M    555M    39%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad0s1e    989M     26k    910M     0%    /tmp
/dev/ad0s1f     12G    3.3G    7.9G    29%    /usr
/dev/ad0s1d    4.3G    1.2G    2.8G    31%    /var
/dev/ad1p1      28G     18G    8.1G    69%    /storage

/etc/make.conf on guest machine:
# added by use.perl 2012-05-03 21:47:34
PERL_VERSION=5.12.4

The host machine runs FreeBSD 8.2-stable:
root@kg-vm# uname -a
FreeBSD kg-vm.kg4.no 8.2-STABLE FreeBSD 8.2-STABLE #4: Sat Dec 17 17:47:43 CET 2011
     root@kg-vm.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

/etc/make.conf on host machine:
NO_PROFILE=     true    # Avoid compiling profiled libraries
# added by use.perl 2011-01-02 02:16:49
PERL_VERSION=5.10.1

Hypervisor is Virtualbox 4.0.8:
root@kg-vm# pv virtual*
virtualbox-ose-4.0.8        <  needs updating (port has 4.0.10) 
virtualbox-ose-kmod-4.0.8   <  needs updating (port has 4.0.10) 


-- 
Torfinn Ingolfsen
Comment 15 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:43 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 16 Eugene Grosbein freebsd_committer freebsd_triage 2020-08-01 09:54:09 UTC
Believed to be fixed with supported versions of sendmail and Virtualbox. If you still have the problem, feel free to re-open this.