Gentoo Archives: gentoo-user

From: felix@×××××××.com
To: gentoo-user@l.g.o
Subject: [gentoo-user] A curious qmail bug in the aftermath of openssl-0.9.8m
Date: Mon, 08 Mar 2010 06:49:20
Message-Id: 20100308064808.GA24267@crowfix.com
1 Interesting Saturday morning. I did an upgrade, nothing spectacular,
2 except qmail-smtpd stopped receiving email, instead leaving this line
3 in the log for every connection attempt:
4
5 /var/qmail/bin/qmail-smtpd: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Cannot allocate memory
6
7 Being somewhat confused by such a combination of finger pointing
8 (libz? qmail-smtpd? shared memory?), and having emerged a new kernel
9 (2.6.33) a few days before but not having rebooted it yet, I thought
10 maybe the update had failed becasue something expected the new
11 kernel. Besides, it hadn't had a -r1 yet, so it was probably working,
12 and wirth trying.
13
14 Encfs stopped working. I have .mozilla, my email archive, bank
15 statements, and various other documents in an encrypted partition, and
16 firefox tried to start me up as a brand new user -- a bit of poking
17 around and I discovered that encfs was awfully confused. I shut it
18 down before anything could be written back, except for whatever
19 Firefox might have done, called a friend (since I couldn't google
20 without a browser and didn't want to set up a brand new config just
21 for this) who quickly found a bug in openssl 0.9.8m, so I downgraded
22 to 0.9.8l-r2 and encfs worked again. Got out the backup from the
23 midnite before, restored the .mozilla data, and I was back in
24 business.
25
26 But still no qmail. Still got that message.
27
28 To make a long story short, google eventually convinced me that the
29 problem was nothing to do with openssl but with the config item
30 SOFTLIMIT_OPTS. Its install default is 8M, but I changed it to 16M 5
31 years ago, and for now, changed to to 40M, and suddenly I have email
32 again. The comments for this options say
33
34 # we limit data and stack segments to 8mbytes, you may need to raise this if
35 # you are using a filter in QMAILQUEUE
36
37 I am a bit confused about this. I can easily imagine that various
38 libs had been gradually increasing in size and I was just a few bytes
39 from the 16M limit, and openssl 0.9.8m bumped over that limit, but
40 when I downgraded back to 0.9.8l-r2, why didn't it drop the size back
41 below the 16M limit? No other system libs changed during that period,
42 and it can't have been anything else since qmail stopped working
43 dyanamically, not only after the reboot. And once I changed the
44 config item, it started working almost instantly.
45
46 All I could think of is that the old 0.9.8l-r2 had some system string,
47 like the result of uname, embedded in it which had grown by just a
48 little since the original 0.9.8l-r2 install back in February.
49
50 Is there some way to accurately measure how much shared space is used
51 by an app, such as when tcpserver fires up qmail-smtpd on incoming
52 connections? I'm pretty curious about this. It would be interesting
53 to see how far over the old 16M limit it is now.
54
55 --
56 ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
57 Felix Finch: scarecrow repairman & rocket surgeon / felix@×××××××.com
58 GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
59 I've found a solution to Fermat's Last Theorem but I see I've run out of room o