Opened 11 years ago

Closed 11 years ago

#25194 closed defect (fixed)

crash: "alloc: invalid block:"

Reported by: ctempleton3@… Owned by: macports-tickets@…
Priority: High Milestone: MacPorts 1.9.1
Component: base Version: 1.9.0
Keywords: tiger Cc: jmroot (Joshua Root), boeyms@…, marco.comini@…, skymoo (Adam Mercer), ryandesign (Ryan Schmidt), vinc17@…, ariel.popper@…
Port:

Description

Just updated to Macports to 1.9.0 and I got the following error when trying to upgrading libtool.

I am running 10.4.11

$ sudo port selfupdate
--->  Updating the ports tree
--->  Updating MacPorts base sources using rsync
MacPorts base version 1.8.2 installed,
MacPorts base version 1.9.0 downloaded.
--->  MacPorts base is outdated, installing new version 1.9.0
Installing new MacPorts release in /opt/local as root:admin; permissions 0775; Tcl-Package in /Library/Tcl


The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
$ port outdated
The following installed ports are outdated:
libtool                        2.2.8_0 < 2.2.10_0        
xrender                        0.9.5_0 < 0.9.6_0         
$ sudo port -u upgrade outdated
--->  Computing dependencies for libtool
--->  Fetching libtool
--->  Attempting to fetch libtool-2.2.10.tar.gz from http://mirrors.kernel.org/gnu/libtool
--->  Verifying checksum(s) for libtool
--->  Extracting libtool
--->  Configuring libtool
alloc: invalid block: 0x311ab8: 0 0 0

Abort trap
$

Attachments (1)

Macports.tclsh.crash.reports.txt (62.5 KB) - added by ariel.popper@… 11 years ago.
Crash.Reports.ajp

Download all attachments as: .zip

Change History (29)

comment:1 Changed 11 years ago by ctempleton3@…

Cc: ctempleton3@… added

Cc Me!

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

Cc: ctempleton3@… removed
Keywords: tiger added

Attach full debug output please. Is a crash log generated?

comment:3 Changed 11 years ago by marco.comini@…

Cc: marco.comini@… added

Cc Me!

comment:4 Changed 11 years ago by ariel.popper@…

Same type of thing has been happening to me.

Just selfupdated, changed the macports.conf setting to sqlite, now no matter what port I try to upgrade or install I get either the alloc invalid block ... abort trap, or a seg fault.

Doesn't really seem to be a pattern, sometimes in patching, sometimes in configuring, sometimes in staging. Don't see anything about any logs being generated.

Also on 10.4.11

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

It wouldn't necessarily trigger the crash reporter GUI. Check if there's a log for tclsh in /Library/Logs/CrashReporter/.

Changed 11 years ago by ariel.popper@…

Crash.Reports.ajp

comment:6 Changed 11 years ago by ariel.popper@…

I hope mine are relevant here.

comment:7 Changed 11 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:8 Changed 11 years ago by ctempleton3@…

Your going to love this. I tried it again with -d and it didn't crash. I do have a crash log but I don't think it relates to this problem.

comment:9 Changed 11 years ago by jmroot (Joshua Root)

Please put large output in attachments, not inline in comments. I edited your comment to remove the crash log because, as you suspected, it was not from the MacPorts process.

The log attached by ariel.popper is helpful. Looks like something's writing to a bad pointer, possibly related to the environment. Could anyone who's affected by this please try a build from the tip of the release_1_9 branch?

comment:10 Changed 11 years ago by jmroot (Joshua Root)

Port: libtool removed
Priority: NormalHigh
Summary: libtool-2.2.10_0 alloc: invalid block:crash: "alloc: invalid block:"

comment:11 Changed 11 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

comment:12 Changed 11 years ago by vinc17@…

I also get crashes on Tiger, but I do not get a "alloc: invalid block:" error, just a segmentation fault. See #25207.

comment:13 Changed 11 years ago by vinc17@…

Cc: vinc17@… added

Cc Me!

comment:14 Changed 11 years ago by ariel.popper@…

Cc: ariel.popper@… added

Cc Me!

comment:15 Changed 11 years ago by ryandesign (Ryan Schmidt)

On Tiger i386, I got:

$ sudo port -u upgrade libtool
Password:
--->  Computing dependencies for libtool
--->  Fetching libtool
--->  Verifying checksum(s) for libtool
--->  Extracting libtool
--->  Configuring libtool
tclsh(21645,0xa000d000) malloc: *** error for object 0x317550: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug
tclsh(21645,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
--->  Building libtool
--->  Staging libtool into destroot
--->  Computing dependencies for libtool
--->  Installing libtool @2.2.10_0+universal
--->  Deactivating libtool @2.2.8_0+darwin+universal
--->  Activating libtool @2.2.10_0+universal
--->  Cleaning libtool
--->  Uninstalling libtool @2.2.8_0+darwin+universal

Nothing from Crash Reporter. Trying to repeat the problem, I am now unable to get past extracting:

$ sudo port build libtool
--->  Computing dependencies for libtool
--->  Fetching libtool
--->  Verifying checksum(s) for libtool
--->  Extracting libtool
Segmentation fault

I've also got:

openssh $ sudo port -u upgrade
--->  Computing dependencies for openssh
--->  Fetching openssh
--->  Verifying checksum(s) for openssh
--->  Extracting openssh
--->  Configuring openssh
Bus error

And if I clean and try again, "Segmentation fault" as above.

My shell is /bin/bash.

comment:16 Changed 11 years ago by ariel.popper@…

I've noticed that repeating the install/upgrade command 2 or 3 times, without cleaning in the middle, results in success.

I have No idea what could be going on. The only thing I cant think of is some sort of memory shenanigans in the kernel. /usr/lib/libSystem.B.dylib also seems to keep popping up in the logs, but I have no clue what it could mean.

comment:17 in reply to:  15 Changed 11 years ago by jmroot (Joshua Root)

Replying to ryandesign@…:

On Tiger i386, I got:

Release or branch?

comment:18 Changed 11 years ago by ryandesign (Ryan Schmidt)

Right, sorry, that was 1.9.0 release. Using the 1.9 branch @68698 I haven't seen the problem yet.

comment:19 Changed 11 years ago by jmroot (Joshua Root)

Can anyone else corroborate Ryan's finding that the branch is OK?

comment:20 Changed 11 years ago by jmroot (Joshua Root)

Cc: jmr@… added

comment:21 Changed 11 years ago by ryandesign (Ryan Schmidt)

I can add that using the 1.9 branch instead of 1.9.0 has fixed these errors for me on two Tiger machines now (i386 and ppc). It's not like the problem was intermittent either; every port I tried was failing every time (different ports had different errors, but always the same errors for that port), and now they all work.

comment:22 Changed 11 years ago by jmroot (Joshua Root)

I'd still like an affected end user to confirm.

comment:23 Changed 11 years ago by jmroot (Joshua Root)

If anyone would like to test this but is having trouble with the svn requirement, let me know and I can send you a tarball.

comment:24 Changed 11 years ago by ariel.popper@…

I can try it out when I get home, but I am not familiar with your dev environment. Is there a quick howto anywhere on getting the correct version installed?

comment:25 in reply to:  24 ; Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to ariel.popper@…:

Is there a quick howto

Joshua posted the instructions here.

comment:26 in reply to:  25 Changed 11 years ago by jmroot (Joshua Root)

Replying to ryandesign@…:

Joshua posted the instructions here.

There's one small mistake in them; instead of cd release_1_9 it should be cd release_1_9/base.

comment:27 Changed 11 years ago by ariel.popper@…

I just tested out the 1.9 branch and it looks like everything is working just as advertised. Tiger PPC.

comment:28 Changed 11 years ago by jmroot (Joshua Root)

Milestone: MacPorts 1.9.1
Resolution: fixed
Status: newclosed

OK, thanks for testing.

Note: See TracTickets for help on using tickets.