Opened 14 years ago

Closed 8 years ago

Last modified 7 years ago

#29148 closed defect (fixed)

miredo crashes due to behaviour disallowed by libdispatch

Reported by: arrigo (Arrigo) Owned by: l2dy (Zero King)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: miredo

Description (last modified by mf2k (Frank Schima))

Building miredo on a MacBook Air 10" running OS X 10.6.7 fails as it builds with arch=x86_64:

[miredo -V]
Miredo: Teredo IPv6 tunneling software 1.2.2 (i386-apple-darwin10.7.0)
built Apr 15 2011 on snowflake.local (i386-apple-darwin10.7.0)
Configured with: ./configure  '--prefix=/opt/local' '--enable-miredo-user' 'CC=/usr/bin/gcc-4.2' 'CFLAGS=-pipe -O2 -arch x86_64' 'LDFLAGS=-L/opt/local/lib -arch x86_64' 'CPPFLAGS=-I/opt/local/include'

but:

snowflake:~ arrigo$ arch
i386
snowflake:~ arrigo$ sudo miredo
Password:
Illegal instruction

Attachments (2)

miredo_2011-06-08-164850_archimede.crash (4.8 KB) - added by arrigo (Arrigo) 13 years ago.
crash file produced by ReportCrash
0001-miredo-fix-crash.patch (1.9 KB) - added by l2dy (Zero King) 8 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Keywords: miredo removed
Owner: changed from macports-tickets@… to mnick@…

Please remember to cc the maintainer.

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Every MacBook Air has an x86_64 processor BTW. If you need proof, run:

sysctl hw.cpu64bit_capable hw.optional.x86_64

comment:3 in reply to:  2 Changed 14 years ago by arrigo (Arrigo)

Replying to jmr@…:

Every MacBook Air has an x86_64 processor BTW. If you need proof, run:

sysctl hw.cpu64bit_capable hw.optional.x86_64

I don't doubt it but not all steppings support the same set of instructions (or rather of extensions such as SSE3), I am not sure how but obviously the compiler is generating code which is invalid for this processor. It seems to run just fine on my MacPro.

Changed 13 years ago by arrigo (Arrigo)

crash file produced by ReportCrash

comment:4 Changed 13 years ago by arrigo (Arrigo)

I went back to my MacPro and the latest version of miredo does not run either, from /var/log/system.log after running "sudo port load miredo":

Jun  8 16:46:33 archimede sudo[709]: arrigo : TTY=ttys000 ; PWD=/Users/arrigo ; USER=root ; COMMAND=/opt/local/bin/port install miredo
Jun  8 16:48:40 archimede miredo[20324]: BUG in libdispatch: 10J869 - 1986 - 0x4
Jun  8 16:48:41 archimede ReportCrash[20326]: Saved crash report for miredo[20324] version ??? (???) to /Users/arrigo/Library/Logs/DiagnosticReports/miredo_2011-06-08-164841_archimede.crash
Jun  8 16:48:43 archimede sudo[20327]: arrigo : TTY=ttys000 ; PWD=/Users/arrigo ; USER=root ; COMMAND=/opt/local/sbin/miredo
Jun  8 16:48:43 archimede miredo[20327]: BUG in libdispatch: 10J869 - 1986 - 0x4
Jun  8 16:48:44 archimede com.apple.ReportCrash.Root[20328]: 2011-06-08 16:48:44.019 ReportCrash[20328:2903] Saved crash report for miredo[20327] version ??? (???) to /Library/Logs/DiagnosticReports/miredo_2011-06-08-164844_localhost.crash
Jun  8 16:48:47 archimede sudo[20329]: arrigo : TTY=ttys000 ; PWD=/Users/arrigo ; USER=root ; COMMAND=/opt/local/bin/port load miredo
Jun  8 16:48:48 archimede /opt/local/sbin/miredo[20332]: BUG in libdispatch: 10J869 - 1986 - 0x4
Jun  8 16:48:48 archimede com.apple.launchd[1] (org.macports.miredo): Throttling respawn: Will start in 10 seconds
Jun  8 16:48:48 archimede com.apple.ReportCrash.Root[20328]: 2011-06-08 16:48:48.127 ReportCrash[20328:1407] Saved crash report for miredo[20332] version ??? (???) to /Library/Logs/DiagnosticReports/miredo_2011-06-08-164848_localhost.crash
Jun  8 16:48:50 archimede miredo[20333]: BUG in libdispatch: 10J869 - 1986 - 0x4
Jun  8 16:48:50 archimede ReportCrash[20326]: Saved crash report for miredo[20333] version ??? (???) to /Users/arrigo/Library/Logs/DiagnosticReports/miredo_2011-06-08-164850_archimede.crash
Jun  8 16:48:58 archimede /opt/local/sbin/miredo[20337]: BUG in libdispatch: 10J869 - 1986 - 0x4
Jun  8 16:48:58 archimede com.apple.launchd[1] (org.macports.miredo): Throttling respawn: Will start in 10 seconds
Jun  8 16:48:58 archimede com.apple.ReportCrash.Root[20328]: 2011-06-08 16:48:58.200 ReportCrash[20328:2d0b] Saved crash report for miredo[20337] version ??? (???) to /Library/Logs/DiagnosticReports/miredo_2011-06-08-164858_localhost.crash
Jun  8 16:49:08 archimede /opt/local/sbin/miredo[20340]: BUG in libdispatch: 10J869 - 1986 - 0x4
Jun  8 16:49:08 archimede com.apple.launchd[1] (org.macports.miredo): Throttling respawn: Will start in 10 seconds
Jun  8 16:49:08 archimede com.apple.ReportCrash.Root[20328]: 2011-06-08 16:49:08.236 ReportCrash[20328:140b] Saved crash report for miredo[20340] version ??? (???) to /Library/Logs/DiagnosticReports/miredo_2011-06-08-164908_localhost.crash
Jun  8 16:49:18 archimede sudo[20341]: arrigo : TTY=ttys000 ; PWD=/Users/arrigo ; USER=root ; COMMAND=/opt/local/bin/port unload miredo

The crash file is attached.

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

Summary: miredo port does not work on i386 OS X 10.6.7 - Illegal Instructionmiredo crashes due to behaviour disallowed by libdispatch

So actually the software is just doing it wrong:

BUG IN CLIENT OF LIBDISPATCH: Do not close random Unix descriptors

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

The problem is in the init_security function in main.c:

	 * We close all file handles, except 0, 1 and 2.

You might want to report a bug upstream.

comment:7 Changed 11 years ago by mf2k (Frank Schima)

Owner: changed from mnick@… to macports-tickets@…

mnick has retired.

comment:8 Changed 8 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to l2dy
Status: newassigned

Changed 8 years ago by l2dy (Zero King)

Attachment: 0001-miredo-fix-crash.patch added

comment:9 Changed 8 years ago by l2dy (Zero King)

Status: assignedaccepted

I'm not able to replicate the crash so could anyone test the fix? I'll close this ticket as wontfix if no feedback received.

Append: Had another patch to apply and changed my mind.

Last edited 7 years ago by l2dy (Zero King) (previous) (diff)

comment:10 Changed 8 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:11 Changed 8 years ago by l2dy (Zero King)

Resolution: fixed
Status: acceptedclosed

In 3fe5cd1f/macports-ports:

miredo: fix crash and update patch

Fixes: #29148

Note: See TracTickets for help on using tickets.