Opened 14 years ago

Closed 13 years ago

#27673 closed defect (fixed)

ssmtp 2.62 segfaults

Reported by: jmdeldin@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: dmitry@…
Port: ssmtp

Description

Hello,

I am unable to get ssmtp 2.62 to run on OS X 10.6.5. No matter what I call, I end up with a segfault:

# port uninstall ssmtp
--->  Deactivating ssmtp @2.62_0
--->  Cleaning ssmtp
--->  Uninstalling ssmtp @2.62_0
--->  Cleaning ssmtp
# rm -rf /opt/local/ssmtp
# port install ssmtp
--->  Computing dependencies for ssmtp
--->  Fetching ssmtp
--->  Verifying checksum(s) for ssmtp
--->  Extracting ssmtp
--->  Applying patches to ssmtp
--->  Configuring ssmtp
--->  Building ssmtp
--->  Staging ssmtp into destroot
--->  Installing ssmtp @2.62_0
--->  Activating ssmtp @2.62_0
--->  Cleaning ssmtp 
# ssmtp
Segmentation fault
# ssmtp -V
Segmentation fault

The crash log from /Library/Logs/DiagnosticReports:

Process:         ssmtp [66639]
Path:            /opt/local/sbin/ssmtp
Identifier:      ssmtp
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [64251]

Date/Time:       2010-12-14 14:06:04.255 -0700
OS Version:      Mac OS X 10.6.5 (10H574)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000800000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib             	0x00007fff80943380 strcmp + 80
1   ssmtp                         	0x00000001000014b8 0x100000000 + 5304
2   ssmtp                         	0x000000010000413b 0x100000000 + 16699
3   ssmtp                         	0x0000000100000c24 0x100000000 + 3108

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000839  rbx: 0x0000000000800000  rcx: 0x0000000000000000  rdx: 0x0000000000000083
  rdi: 0x0000000000800000  rsi: 0x00000001000047c7  rbp: 0x00007fff5fbff650  rsp: 0x00007fff5fbff608
   r8: 0x0000000100300080   r9: 0x0000000000000000  r10: 0x00007fff8935cd88  r11: 0x00007fff80943330
  r12: 0x0000000000000002  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x00007fff80943380  rfl: 0x0000000000010213  cr2: 0x0000000000800000

Binary Images:
       0x100000000 -        0x100005fff +ssmtp ??? (???) <E5719C9F-1619-B78E-284F-8940949DD568> /opt/local/sbin/ssmtp
       0x100011000 -        0x10005cfe7 +libssl.1.0.0.dylib ??? (???) <DC59EABC-BD59-F290-472B-70B273CE0179> /opt/local/lib/libssl.1.0.0.dylib
       0x100073000 -        0x1001c2fe7 +libcrypto.1.0.0.dylib ??? (???) <2AF989B8-D0C5-D780-1128-878F4F90E9D3> /opt/local/lib/libcrypto.1.0.0.dylib
       0x10022e000 -        0x100242ff7 +libz.1.dylib 1.2.5 (compatibility 1.0.0) <6D767FC2-DF89-6017-4B82-A1E5EB8CEED9> /opt/local/lib/libz.1.dylib
    0x7fff5fc00000 -     0x7fff5fc3bdef  dyld 132.1 (???) <472D950D-70F8-B810-A959-9184C2AA6C74> /usr/lib/dyld
    0x7fff8093f000 -     0x7fff80b00fff  libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib
    0x7fff88855000 -     0x7fff88859ff7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
    0x7fffffe00000 -     0x7fffffe01fff  libSystem.B.dylib ??? (???) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib

From gdb:

(gdb) run
Starting program: /opt/local/sbin/ssmtp 
Reading symbols for shared libraries +++.. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000800000
0x00007fff80943380 in strcmp ()
(gdb) 

Please let me know if you need more information.

Thank you!

Change History (4)

comment:1 in reply to:  description Changed 14 years ago by jmdeldin@…

Replying to jmdeldin@…:

# rm -rf /opt/local/ssmtp

Er...that should have been /opt/local/etc/ssmtp. However, it doesn't change anything because it was a vanilla ssmtp install.

comment:2 Changed 14 years ago by dmitry@…

Cc: dmitry@… added

Cc Me!

comment:3 Changed 14 years ago by dmitry@…

Here's some more data:

(gdb) run
Starting program: /Users/russo/Temp/ssmtp/ssmtp 
Reading symbols for shared libraries +++... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000800008
0x00007fff880a5380 in strcmp ()
(gdb) bt
#0  0x00007fff880a5380 in strcmp ()
#1  0x00000001000014b8 in parse_options (argc=1, argv=0x7fff5fbff960) at ssmtp.c:1720
#2  0x000000010000413b in main (argc=1, argv=0x7fff5fbff960) at ssmtp.c:2075

And this is the function that is breaking everything (the if statement fails):

1720     if(strcmp(prog, "mailq") == 0) {                                               
1721         /* Someone wants to know the queue state... */
1722         paq("mailq: Mail queue is empty\n");
1723     }

here's where "prog" gets set:

2066     /* Set the globals */
2067     prog = basename(argv[0]);

Any idea what might have broken it on 10.6.5/10.6.6? I know I've had this package running before.

comment:4 Changed 13 years ago by jmroot (Joshua Root)

Keywords: ssmtp segfault removed
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.