Mailing List Archive

[Bug 751] random exim_setugid / getpwuid bug
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #2 from Nigel Metheringham <nigel@exim.org> 2008-08-19 15:22:47 ---
The attached crash log and the problem description do not match up.
The crash log is in the DNS resolver, which should have no links to the
getpw* functions, the description describes a problem in the getpw*
functions.

[.How are your user databases accessed? In some cases that could link
DNS and user data, but the traceback appears to be showing a straight
host DNS lookup path]

In either case this appears to be an OS library issue and not anything
that exim has control over or can mitigate.

Leaving in NEW state for now, but will close as INVALID unless further
evidence for an exim problem is attached.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751

Dominic Germain <dominic.germain@sogetel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |dominic.germain@sogetel.com




--- Comment #1 from Dominic Germain <dominic.germain@sogetel.com> 2008-08-19 15:09:59 ---
OSX save that king in crash log when Exim die...

<code>
Process: exim [14413]
Path: /usr/exim/bin/exim
Identifier: exim
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: exim [63944]

Date/Time: 2008-08-19 09:57:56.336 -0400
OS Version: Mac OS X Server 10.5.4 (9E17)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000c0001a73
Crashed Thread: 0

Thread 0 Crashed:
0 libSystem.B.dylib 0x924c51b7 dn_expand + 221
1 exim 0x00016d65 dns_next_rr + 397
2 exim 0x00016f28 dns_lookup + 313
3 exim 0x00032ea6 host_find_bydns + 445
4 exim 0x00083382 dnslookup_router_entry + 717
5 exim 0x00052050 route_address + 2757
6 exim 0x000692a0 verify_address + 1387
7 exim 0x000038e7 acl_verify + 5303
8 exim 0x00005923 acl_check_condition + 7222
9 exim 0x00006142 acl_check_internal + 1347
10 exim 0x00006845 acl_check + 229
11 exim 0x0005e4d3 smtp_setup_msg + 9034
12 exim 0x00009bdb daemon_go + 9281
13 exim 0x0001ed45 main + 24309
14 exim 0x00001726 start + 54

Thread 0 crashed with X86 Thread State (32-bit):
eax: 0xbfffab1c ebx: 0x924c50e5 ecx: 0xc0001a73 edx: 0xbfffb1ac
edi: 0xbfffb1a8 esi: 0xbfffaa1c ebp: 0xbfffa978 esp: 0xbfffa960
ss: 0x0000001f efl: 0x00010282 eip: 0x924c51b7 cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0xc0001a73

Binary Images:
0x1000 - 0xedfe3 +exim ??? (???) /usr/exim/bin/exim
0x8fe00000 - 0x8fe2da53 dyld 96.2 (???) <14ac3b684fa5a31932fa89c4bba7a29b>
/usr/lib/dyld
0x923c0000 - 0x92520ff3 libSystem.B.dylib ??? (???)
<98fc91f31f185411ddc46d3225e9af55> /usr/lib/libSystem.B.dylib
0x92560000 - 0x9256effd libz.1.dylib ??? (???)
<5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib
0x950e9000 - 0x950edfff libmathCommon.A.dylib ??? (???)
/usr/lib/system/libmathCommon.A.dylib
0x972ea000 - 0x972f1fe9 libgcc_s.1.dylib ??? (???)
<a9ab135a5f81f6e345527df87f51bfc
</code>


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #3 from Dominic Germain <dominic.germain@sogetel.com> 2008-08-19 16:14:18 ---
Good point, crash log have nothing to do with my bug. I just double check and
none of them match with "cannot run initgroups(): no passwd entry for uid=90"
error according to timestamps. I'll try submit that crashlog to Apple.

---

For the bug itself, I just add some debug "log_write" in my Exim build to
figure what is happening. I will also try to call initgroup with a harcoded
"exim" user and comment out the "getpwuid" call to see if it solve the
problem...


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #4 from Dominic Germain <dominic.germain@sogetel.com> 2008-08-23 03:44:21 ---
I've add some debug traces in exim.c (see the attached file).

Those lines allow me to discover that sometime, getegid return "20" while
geteuid return "0".

Error case :
2008-08-22 20:41:16 uid:90 / gid:20 / euid:0 / egid:20 / root_uid:0
2008-08-22 20:41:16 cannot run initgroups(): no passwd entry for uid=90

Normal case :
2008-08-22 21:54:15 uid:90 / gid:20 / euid:0 / egid:0 / root_uid:0
2008-08-22 21:54:15 initgroups completed

Any idea?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #5 from Dominic Germain <dominic.germain@sogetel.com> 2008-08-23 03:45:20 ---
Created an attachment (id=266)
--> (http://bugs.exim.org/attachment.cgi?id=266)
modified exim.c with traces


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #6 from Dominic Germain <dominic.germain@sogetel.com> 2008-08-29 18:48:22 ---
Created an attachment (id=268)
--> (http://bugs.exim.org/attachment.cgi?id=268)
new startup files

I start using Launchd to start Exim instead of a "rc" style script and I have
no more "initgroup" failures on my two servers! But, I still have DNS related
crash (very few).

Launchd is taking care of running exim as exim user.

FYI, starting with MacOSX 10.4, Apple is moving cron, startup and xinet into
launchd (his open source solution). The attached ZIP contains files for
launching Exim from launchd. It also contains log cycling and db tidying
scripts.

I will be happy if those files are put into Exim distribution.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751

Tony Finch <dot@dotat.at> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |dot@dotat.at
Status|NEW |RESOLVED
Resolution| |INVALID




--- Comment #7 from Tony Finch <dot@dotat.at> 2008-09-05 18:31:20 ---
We generally don't ship rc scripts with Exim, because there's basically no
portability between different unixes. Perhaps you could add your script to the
wiki?

I'm marking the bug as "invalid" because it appears to be a launchd problem
rather than an Exim problem.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #8 from Tony Finch <dot@dotat.at> 2008-09-05 18:35:36 ---
PS. Are your DNS crashes related to this thread on the mailing list?
http://lists.exim.org/lurker/message/20080819.170616.0834a9d0.en.html


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 751] random exim_setugid / getpwuid bug [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=751




--- Comment #9 from Dominic Germain <dominic.germain@sogetel.com> 2008-09-05 20:19:46 ---
it's similar but I'm not able to reproduce it that way... (with 127 and more
MX domain)


If I check one of my server right now, I got a recent crash :

Process: exim [99979]
Path: /usr/exim/bin/exim
Identifier: exim
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: exim [31871]

Date/Time: 2008-09-05 14:48:06.043 -0400
OS Version: Mac OS X Server 10.5.4 (9E17)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000c0000a04
Crashed Thread: 0

Thread 0 Crashed:
0 libSystem.B.dylib 0x924c51b7 dn_expand + 221
1 exim 0x00016d65 dns_next_rr + 397
2 exim 0x00016f28 dns_lookup + 313
3 exim 0x00033c7d host_name_lookup + 339
4 exim 0x0006db24 check_host + 1968
5 exim 0x0003709c match_check_list + 2268
6 exim 0x00036dc8 match_check_list + 1544
7 exim 0x00036dc8 match_check_list + 1544
8 exim 0x0006b4df verify_check_this_host + 220
9 exim 0x00004934 acl_check_condition + 3143
10 exim 0x00006142 acl_check_internal + 1347
11 exim 0x00006845 acl_check + 229
12 exim 0x0004bb23 receive_msg + 13036
13 exim 0x00009bed daemon_go + 9299
14 exim 0x0001ed45 main + 24309
15 exim 0x00001726 start + 54

Thread 0 crashed with X86 Thread State (32-bit):
eax: 0xbfffc6cc ebx: 0x924c50e5 ecx: 0xc0000a04 edx: 0xbfffcbc8
edi: 0xbfffcbc4 esi: 0xbfffc5cc ebp: 0xbfffc528 esp: 0xbfffc510
ss: 0x0000001f efl: 0x00010286 eip: 0x924c51b7 cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0xc0000a04

Binary Images:
0x1000 - 0xedfe3 +exim ??? (???) /usr/exim/bin/exim
0x8fe00000 - 0x8fe2da53 dyld 96.2 (???) <14ac3b684fa5a31932fa89c4bba7a29b>
/usr/lib/dyld
0x923c0000 - 0x92520ff3 libSystem.B.dylib ??? (???)
<98fc91f31f185411ddc46d3225e9af55> /usr/lib/libSystem.B.dylib
0x92560000 - 0x9256effd libz.1.dylib ??? (???)
<5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib
0x950e9000 - 0x950edfff libmathCommon.A.dylib ??? (???)
/usr/lib/system/libmathCommon.A.dylib
0x972ea000 - 0x972f1fe9 libgcc_s.1.dylib ??? (???)
<a9ab135a5f81f6e345527df87f51bfc9> /usr/lib/libgcc_s.1.dylib
0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib


here what I have in my Exim log for the same time :

2008-09-05 14:48:06 H=[71.187.197.18] Warning: --STATS-->
[71.187.197.18->connect]

2008-09-05 14:48:06 H=[121.133.154.98] rejected connection in "connect" ACL:
--STATS--> [121.133.154.98->reject_host]

2008-09-05 14:48:06 H=[71.187.197.18] rejected connection in "connect" ACL:
--STATS--> [71.187.197.18->reject_host]

2008-09-05 14:48:06 H=(bartnik) [82.160.84.102]
F=<cockfights38@inspectorsoffice.com> rejected RCPT
<cockfights3@pwitransit.com>: --STATS--> [82.160.84.102->reject_rcpt]:
Unrouteable address

2008-09-05 14:48:06 H=(home-315298.b.astral.ro) [89.136.136.129]
F=<tterlege@reckamp.com> rejected RCPT <suivimarcob@tcfl.com>: --STATS-->
[89.136.136.129->reject_rcpt]: Unrouteable address

If I try to simulated a connection with exim -bh <any ip in the list>, it seems
to be fine...


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##