Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unicos compile problem with 5.005_56 #1119

Closed
p5pRT opened this issue Feb 2, 2000 · 21 comments
Closed

unicos compile problem with 5.005_56 #1119

p5pRT opened this issue Feb 2, 2000 · 21 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 2, 2000

Migrated from rt.perl.org#2077 (status was 'resolved')

Searchable as RT2077$

@p5pRT
Copy link
Author

p5pRT commented Feb 2, 2000

From jsalinas@sgi.com

It seems I have run into yet another snag trying to install
perl on a large CRAY PVP (parallel vector platform) running
unicos 10.0.0.6 with perl 5.005.63.

Last time I had a problem with perl5.005.02 it was because
perl selected its own malloc by default when I switched
to using the systems malloc it would configure and run
make.

The problem I have now seems centered around the same
type of problem - the perl malloc does not speak to
word addressable machines but now the cray malloc
does not seem to speak to perl land.

When I run configure using the defaults and use the
system malloc I see the following message​:

Your system wants malloc to return 'void *', it would seem.
Your system uses void free(), it would seem.

When the make runs I receive the following message​:
[ahipc25]/apc01/perl/perl5.005_63%make
  `sh cflags libperl.a miniperl` -DPERL_EXTERNAL_GLOB -o opmini.o op.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -O0
  /opt/ctl/bin/cc -L/usr/local/lib -o miniperl \
  miniperlmain.o opmini.o libperl.a -lnsl -lmalloc -lc -lcrypt
  ./miniperl -w -Ilib -MExporter -e 0 || make minitest
sh​: 30547 Error exit(coredump)
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
  cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty

The following tests fail​:
comp/script.......FAILED at test 1
io/argv...........FAILED at test 1
io/open...........FAILED at test 25
io/openpid........Can't locate IO/File.pm in @​INC (@​INC contains​: ../lib /apc01/perl/perl5.005_63/perl//lib/5.00563/CRAY_TS-unicos /apc01/perl/perl5.005_63/perl//lib/5.00563 /apc01/perl/perl5.005_63/perl//lib/site_perl/5.00563/CRAY_TS-unicos /apc01/perl/perl5.005_63/perl//lib/site_perl .) at ../lib/FileHandle.pm line 9.
Compilation failed in require at io/openpid.t line 20.
BEGIN failed--compilation aborted at io/openpid.t line 20.
FAILED at test 0
op/die_exit.......FAILED at test 1
op/goto...........FAILED at test 3
op/magic..........FAILED at test 15
op/rand...........perl returned error code 135 at op/rand.t line 356.
FAILED at test 11

Make​: " cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty"​: Error code 1 (ignored)
  ./miniperl configpm configpm.tmp
  sh mv-if-diff configpm.tmp lib/Config.pm
File lib/Config.pm not changed.
  AutoSplitting perl library
  ./miniperl -Ilib -e 'use AutoSplit; \
  autosplit_lib_modules(@​ARGV)' lib/*.pm lib/*/*.pm
Make​: " ./miniperl -Ilib -e 'use AutoSplit; \
  autosplit_lib_modules(@​ARGV)' lib/*.pm lib/*/*.pm" terminated due to signal 7 (core dumped)

Then the make core dumps. The debug print shows​:

################################################################################
ahipc25]/apc01/perl/perl5.005_63%/opt/ctl/bin/debugview -c core
CrayTools DebugView 3.0.0.18 (Cray version) Dec 3 1998 13​:01​:59
No symbol file is available; source debugging won't be available

***** START OF SYMBOLIC DUMP *****

LIST OF PROCESS STATES

CPUs 35593​: Signal SIGERR <Error exit>

DISPLAYING CPUs 35593​: Signal SIGERR <Error exit>

Signal SIGERR in routine Perl_filter_read at address 0p73511a
Perl_filter_read was called by S_filter_gets at line 1885 (address 0p121442d)
S_filter_gets was called by Perl_yylex at line 2339 (address 0p123245a)
Perl_yylex was called by Perl_yyparse at line 1424 (address 0p204313d)
Perl_yyparse was called by S_parse_body at line 1082 (address 0p60270d)
S_parse_body was called by Perl_vdefault_protect at line 45 (address 0p506262c)
Perl_vdefault_protect was called by Perl_default_protect at line 26 (address 0p506176c)
Perl_default_protect was called by perl_parse at line 726 (address 0p56050a)
perl_parse was called by main at line 51 (address 0p1245d)
main was called by $START$ at line 334 (address 0p1171c)

***** END OF SYMBOLIC DUMP *****

################################################################################

I tried removing the miniperl and compiling it by hand​:
/opt/ctl/bin/cc -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a -lnsl -lmalloc -lc -lcrypt

then with miniperl I could print out a version number as 5.005_63
without a problem but if I tried to print out hellow world it
would receive the SIGERR and core dump.

At this point I tried removed the perl directory and redid the configure
using perl malloc but the make failed same spot different error​:
  rm -f libperl.a
  /bin/ar rcu libperl.a perl.o malloc.o gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o
  `sh cflags libperl.a miniperl` -DPERL_EXTERNAL_GLOB -o opmini.o op.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -G f -O0
  /opt/ctl/bin/cc -o miniperl \
  miniperlmain.o opmini.o libperl.a -lnsl -lm -lc -lcrypt
  ./miniperl -w -Ilib -MExporter -e 0 || make minitest
Misalignment of sbrk()
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
  cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
Misalignment of sbrk()
Make​: " cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty"​: Error code 2 (ignored)
  ./miniperl configpm configpm.tmp
Misalignment of sbrk()
Make​: " ./miniperl configpm configpm.tmp"​: Error code 2

that miniperl was so broken that if I tried to print out
the version number I received​:
[ahipc25]/users/user0/jsalinas/perl5.005_63%./miniperl -v
Misalignment of sbrk()

I tried moving the term.t file to /t/lib and I am compiling
with the /opt/ctl/bin/cc -O0 -G f (no optimization full debugging)

Any suggestions on where I should go to next? Any suggestions
and ideas would be greatly appreciated.

thanks,
john
wi

@p5pRT
Copy link
Author

p5pRT commented Feb 2, 2000

From [Unknown Contact. See original ticket]

John Salinas writes​:

     \./miniperl \-w \-Ilib \-MExporter \-e 0 || make minitest

Misalignment of sbrk()

Perl failed to convince sbrk() to return something on 0x800-byte
boundary. What happens if you configure with

  -D optimize=-g

and then run

  miniperl -Dm -e0

?

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

Using the unicos supplied malloc and the -D optimize=-g flag
on the Cray Standard C Version 6.3.0.2 both perl 5.005.63
and perl5.5.640 compile with just a few minor messages.

If I use the perl supplied malloc with the -D optimize=-g flag
on any cray complier I still receive the Misalignment of sbrk().
Maybe it would be a good idea on unicos PVP and Scalar platforms
to make the -D optimize=-g flag standard as well as using the
unicos supplied malloc (which I belive it already is default).

I successfully compiled both of the above mentioned versions
of perl on a t94 with 3 processor, a t932 with 32 processor,
an sv1 and c90.

thanks,
john


Make Messages

With unicos malloc and the -D optimize=-g flag on
lib/io_sock.........FAILED at test 14
lib/odbm............FAILED at test 0
u=1.98199 s=1.72903 cu=191.657 cs=22.0608 scripts=222 tests=9281
Make​: "if (true </dev/tty) >/dev/null 2>&1; then \
  cd t && ./perl TEST </dev/tty; \
else \
  cd t && PERL_SKIP_TTY_TEST=1 ./perl TEST; \
fi"​: Error code 1

/perldebug.tmp
** Unterminated C<...> at perldebug.pod line 148
  ln /nomad/u3/jsalinas/perl2/man/man1/perldebug.tmp /nomad/u3/jsalinas/perl2/man/man1/perldebug.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perldebug.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perldelta.pod > /nomad/u3/jsalinas/perl2/man/man1

/perldelta.tmp
** Unterminated C<...> at perldelta.pod line 1920
  ln /nomad/u3/jsalinas/perl2/man/man1/perldelta.tmp /nomad/u3/jsalinas/perl2/man/man1/perldelta.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perldelta.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perldiag.pod > /nomad/u3/jsalinas/perl2/man/man1/

perldiag.tmp
** Unterminated C<...> at perldiag.pod line 3102
  ln /nomad/u3/jsalinas/perl2/man/man1/perldiag.tmp /nomad/u3/jsalinas/perl2/man/man1/perldiag.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perldiag.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perldsc.pod > /nomad/u3/jsalinas/perl2/man/man1/p
man1/p

perltrap.tmp
  ln /nomad/u3/jsalinas/perl2/man/man1/perltrap.tmp /nomad/u3/jsalinas/perl2/man/man1/perltrap.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perltrap.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perlvar.pod > /nomad/u3/jsalinas/perl2/man/man1/perlvar.tmp
** Unterminated C<...> at perlvar.pod line 188
** Unterminated C<...> at perlvar.pod line 188
** Unterminated C<...> at perlvar.pod line 424
  ln /nomad/u3/jsalinas/perl2/man/man1/perlvar.tmp /nomad/u3/jsalinas/perl2/man/man1/perlvar.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perlvar.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perlxs.pod > /nomad/u3/jsalinas/perl2/man/man1/perlxs.tmp

perlhpux.tmp
  ln /nomad/u3/jsalinas/perl2/man/man1/perlhpux.tmp /nomad/u3/jsalinas/perl2/man/man1/perlhpux.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perlhpux.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perlos2.pod > /nomad/u3/jsalinas/perl2/man/man1/perlos2.tmp
Unmatched =back at ../pod/pod2man line 40
** Unterminated C<...> at perlos2.pod line 1139
  ln /nomad/u3/jsalinas/perl2/man/man1/perlos2.tmp /nomad/u3/jsalinas/perl2/man/man1/perlos2.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perlos2.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perlos390.pod > /nomad/u3/jsalinas/perl2/man/man1/perlos390.tmp
  ln /nomad/u3/jsalinas/perl2/man/man1/perlos390.tmp /nomad/u3/jsalinas/perl2/man/man1/perlos390.1
  unlink /nomad/u3/jsalinas/perl2/man/man1/perlos390.tmp
  ../perl -I ../lib ../pod/pod2man --section=1 --official perlwin32.pod > /nomad/u3/jsalinas/perl2/man/man1

With perl malloc and -D optimize=-g flag

nomad% make
  `sh cflags libperl.a miniperl` -DPERL_EXTERNAL_GLOB -o opmini.o op.c
  CCCMD = /opt_ieee/ctl/bin/cc -DPERL_CORE -c -G f -O0 -D optimize=-g
  /opt_ieee/ctl/bin/cc -o miniperl \
  miniperlmain.o opmini.o libperl.a -lnsl -lm -lc -lcrypt
  ./miniperl -w -Ilib -MExporter -e 0 || make minitest
Misalignment of sbrk()
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
  cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
Misalignment of sbrk()
Make​: " cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty"​: Error code 2
(ignored)
  ./miniperl configpm configpm.tmp
Misalignment of sbrk()
Make​: " ./miniperl configpm configpm.tmp"​: Error code 2


Old E-mail Message

John Salinas writes​:

     \./miniperl \-w \-Ilib \-MExporter \-e 0 || make minitest

Misalignment of sbrk()

Perl failed to convince sbrk() to return something on 0x800-byte
boundary. What happens if you configure with

-D optimize=-g

and then run

miniperl -Dm -e0

?

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

On Thu, Feb 03, 2000 at 03​:15​:20PM -0600, John Salinas wrote​:

Using the unicos supplied malloc and the -D optimize=-g flag
on the Cray Standard C Version 6.3.0.2 both perl 5.005.63
and perl5.5.640 compile with just a few minor messages.

If I use the perl supplied malloc with the -D optimize=-g flag
on any cray complier I still receive the Misalignment of sbrk().

Perl failed to convince sbrk() to return something on 0x800-byte
boundary. What happens if you configure with

-D optimize=-g

and then run

miniperl -Dm -e0

?

You still did not report results of running requested program...

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

nomad% /opt_ieee/ctl/bin/cc -D optimize=-g -o miniperl miniperlmain.o opmini.o libperl.a -lm -lc -lcrypt -lnsl
nomad% ./miniperl -Dm -e0
nomad% Misalignment of sbrk()

I am assuming though that was because I was still uing the
perl supplied malloc. On all other perl5's I have used
the make requires the use of the perl malloc or something
like this happens​:

./miniperl -w -Ilib -MExporter -e 0 || make minitest
filter_del can only delete in reverse order (currently) at -e line 1.
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
Make​: " ./miniperl configpm tmp" terminated due to signal 11 (core dumped)

I also no longer have to move term.t and edit toke.c by
hand to get make to work - that is a vast improvement over
older perl installs.

One other very minor thing it woudl be nice to have line
26 edited of xsutils.c to get change the /* there -otherwise
I have to go in by hadn and delete it so I can run make.

thanks,
john

On Thu, Feb 03, 2000 at 03​:15​:20PM -0600, John Salinas wrote​:

Using the unicos supplied malloc and the -D optimize=-g flag
on the Cray Standard C Version 6.3.0.2 both perl 5.005.63
and perl5.5.640 compile with just a few minor messages.

If I use the perl supplied malloc with the -D optimize=-g flag
on any cray complier I still receive the Misalignment of sbrk().

Perl failed to convince sbrk() to return something on 0x800-byte
boundary. What happens if you configure with

-D optimize=-g

and then run

miniperl -Dm -e0

?

You still did not report results of running requested program...

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

On Thu, Feb 03, 2000 at 03​:33​:04PM -0600, John Salinas wrote​:

nomad% /opt_ieee/ctl/bin/cc -D optimize=-g -o miniperl miniperlmain.o opmini.o libperl.a -lm -lc -lcrypt -lnsl

I somewhat confused​: you did not put

-D optimize=-g

on the Configure command line (after renaming config.sh)? (With
Perl's malloc() chosen).

nomad% ./miniperl -Dm -e0
nomad% Misalignment of sbrk()

This should not happen if you did as I said.

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

I did not rename config.sh here were the steps I went
through​:
rm -f config.sh Policy.sh
sh Configure
  Operating system name? [unicos]
  Operating system version? [10.0.0gy]
  Build a threading Perl? [n]
  Build Perl for multiplicity? [n]
  Which memory models are supported? [none]
  Use which C compiler? [/opt/ctl/bin/cc]
  Directories to use for library searches?
[/skl/lib /skl/usr/lib /ulib/lib /bnch/usr/lib /bnch/lib /bnch/skl/lib /bnch/skl/usr/lib /100cfp/lib]
  What is the file extension used for shared libraries? [so]
  Build Perl for SOCKS? [n]
  What libraries to use? [-lnsl -lmalloc -lc -lcrypt]
  What optimizer/debugger flag should be used? [-D optimize=-g]
  Any additional cc flags? [-DDEBUGGING]
  Any additional ld flags (NOT including libraries)? [none]
  ...
make
make test
make install

This would work for unicos malloc and not the perl malloc, the
same way it would fail if I just compiled miniperl by hand.

After re-reading your e-mails I tried this​:
nomad% rm -f config.sh Policy.sh
nomad% sh Configure -D optimize=-g

On the make it blew up on the malloc again​:

CC-9 cc​: WARNING File = xsutils.c, Line = 26
  A "/*" appears inside a comment.

  * bundled lib/*.pm files is in a version-specific directory,
  ^

  `sh cflags libperl.a globals.o` globals.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  `sh cflags libperl.a perlio.o` perlio.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  rm -f libperl.a
  /bin/ar rcu libperl.a perl.o malloc.o gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o
  `sh cflags libperl.a miniperl` -DPERL_EXTERNAL_GLOB -o opmini.o op.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  /opt/ctl/bin/cc -o miniperl \
  miniperlmain.o opmini.o libperl.a -lnsl -lc -lcrypt
  ./miniperl -w -Ilib -MExporter -e 0 || make minitest
Corrupt malloc ptr 0xc at 0x4
Corrupt malloc ptr 0x0 at 0x63314
Corrupt malloc ptr 0x0 at 0x63414
Corrupt malloc ptr 0x63524 at 0x63514
Corrupt malloc ptr 0x63694 at 0x63614
Corrupt malloc ptr 0x14 at 0xc
Corrupt malloc ptr 0x0 at 0x63714
Corrupt malloc ptr 0x1c at 0x14
Corrupt malloc ptr 0x0 at 0x63694
Corrupt malloc ptr 0x24 at 0x1c
Corrupt malloc ptr 0x63534 at 0x63524
Corrupt malloc ptr 0x63894 at 0x63814
Corrupt malloc ptr 0x0 at 0x63914
Corrupt malloc ptr 0x0 at 0x63a14
Corrupt malloc ptr 0x0 at 0x63e14
Corrupt malloc ptr 0x63f54 at 0x63f14
Corrupt malloc ptr 0x63f94 at 0x63f54
Corrupt malloc ptr 0x0 at 0x64014
Corrupt malloc ptr 0x64134 at 0x64114
Corrupt malloc ptr 0x0 at 0x64214
Corrupt malloc ptr 0x2c at 0x24
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
sh​: 79665 Abort(coredump)
  rm -f lib/re.pm
  cat ext/re/re.pm > lib/re.pm
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
  cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
Corrupt malloc ptr 0x9 at 0x1
Corrupt malloc ptr 0x0 at 0x63441
Corrupt malloc ptr 0x0 at 0x63541
Corrupt malloc ptr 0x63651 at 0x63641
Corrupt malloc ptr 0x637c1 at 0x63741
Corrupt malloc ptr 0x11 at 0x9
Corrupt malloc ptr 0x0 at 0x63841
Corrupt malloc ptr 0x19 at 0x11
Corrupt malloc ptr 0x0 at 0x637c1
Corrupt malloc ptr 0x21 at 0x19
Corrupt malloc ptr 0x63661 at 0x63651
Corrupt malloc ptr 0x639c1 at 0x63941
Corrupt malloc ptr 0x0 at 0x63a41
Corrupt malloc ptr 0x0 at 0x63b41
Corrupt malloc ptr 0x0 at 0x63f41
Corrupt malloc ptr 0x64081 at 0x64041
Corrupt malloc ptr 0x640c1 at 0x64081
Corrupt malloc ptr 0x0 at 0x64141
Corrupt malloc ptr 0x64261 at 0x64241
Corrupt malloc ptr 0x0 at 0x64341
Corrupt malloc ptr 0x29 at 0x21
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Make​: " cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty" terminated due to signal 6 (core dumped) (ignored)
  ./miniperl configpm configpm.tmp
Corrupt malloc ptr 0xf at 0x7
Corrupt malloc ptr 0x0 at 0x6330f
Corrupt malloc ptr 0x0 at 0x6340f
Corrupt malloc ptr 0x6351f at 0x6350f
Corrupt malloc ptr 0x6368f at 0x6360f
Corrupt malloc ptr 0x17 at 0xf
Corrupt malloc ptr 0x0 at 0x6370f
Corrupt malloc ptr 0x1f at 0x17
Corrupt malloc ptr 0x0 at 0x6368f
Corrupt malloc ptr 0x27 at 0x1f
Corrupt malloc ptr 0x6352f at 0x6351f
Corrupt malloc ptr 0x6388f at 0x6380f
Corrupt malloc ptr 0x0 at 0x6390f
Corrupt malloc ptr 0x0 at 0x63a0f
Corrupt malloc ptr 0x0 at 0x63e0f
Corrupt malloc ptr 0x63f4f at 0x63f0f
Corrupt malloc ptr 0x63f8f at 0x63f4f
Corrupt malloc ptr 0x0 at 0x6400f
Corrupt malloc ptr 0x6412f at 0x6410f
Corrupt malloc ptr 0x0 at 0x6420f
Corrupt malloc ptr 0x2f at 0x27
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Make​: " ./miniperl configpm configpm.tmp" terminated due to signal 6 (core dumped)

But I still did try the following​:
nomad% ./miniperl -Dm -e0
Corrupt malloc ptr 0xd at 0x5
Corrupt malloc ptr 0x0 at 0x6330d
Corrupt malloc ptr 0x0 at 0x6340d
Corrupt malloc ptr 0x6351d at 0x6350d
Corrupt malloc ptr 0x6368d at 0x6360d
Corrupt malloc ptr 0x15 at 0xd
Corrupt malloc ptr 0x0 at 0x6370d
Corrupt malloc ptr 0x1d at 0x15
Corrupt malloc ptr 0x0 at 0x6368d
Corrupt malloc ptr 0x25 at 0x1d
Corrupt malloc ptr 0x6352d at 0x6351d
Corrupt malloc ptr 0x6388d at 0x6380d
Corrupt malloc ptr 0x0 at 0x6390d
Corrupt malloc ptr 0x0 at 0x63a0d
Corrupt malloc ptr 0x0 at 0x63e0d
Corrupt malloc ptr 0x63f4d at 0x63f0d
Corrupt malloc ptr 0x63f8d at 0x63f4d
Corrupt malloc ptr 0x0 at 0x6400d
Corrupt malloc ptr 0x6412d at 0x6410d
Corrupt malloc ptr 0x0 at 0x6420d
Corrupt malloc ptr 0x2d at 0x25
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Abort (core dumped)

I have not looked at the core yet but I am guessing
it is the same problem we had before where the perl malloc
cannot handle the 64 bit system or word addressing.

Either way unless I misunderstand your instructions it
did not work using the perl malloc.

thanks,
john

 

On Thu, Feb 03, 2000 at 03​:33​:04PM -0600, John Salinas wrote​:

nomad% /opt_ieee/ctl/bin/cc -D optimize=-g -o miniperl miniperlmain.o opmini.o libperl.a -lm -lc -lcrypt -lnsl

I somewhat confused​: you did not put

-D optimize=-g

on the Configure command line (after renaming config.sh)? (With
Perl's malloc() chosen).

nomad% ./miniperl -Dm -e0
nomad% Misalignment of sbrk()

This should not happen if you did as I said.

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

On Thu, Feb 03, 2000 at 05​:57​:03PM -0600, John Salinas wrote​:

I did not rename config.sh here were the steps I went
through​:
rm -f config.sh Policy.sh
sh Configure

I did not see

  sh Configure -D optimize=-g

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

It is there you did not read far enough down I will
paste the e-maill in and mark i twith a
------------------------->

I did not rename config.sh here were the steps I went
through​:
rm -f config.sh Policy.sh
sh Configure
  Operating system name? [unicos]
  Operating system version? [10.0.0gy]
  Build a threading Perl? [n]
  Build Perl for multiplicity? [n]
  Which memory models are supported? [none]
  Use which C compiler? [/opt/ctl/bin/cc]
  Directories to use for library searches?
[/skl/lib /skl/usr/lib /ulib/lib /bnch/usr/lib /bnch/lib /bnch/skl/lib /bnch/skl/usr/lib /100cfp/lib]
  What is the file extension used for shared libraries? [so]
  Build Perl for SOCKS? [n]
  What libraries to use? [-lnsl -lmalloc -lc -lcrypt]
  What optimizer/debugger flag should be used? [-D optimize=-g]
  Any additional cc flags? [-DDEBUGGING]
  Any additional ld flags (NOT including libraries)? [none]
  ...
make
make test
make install

This would work for unicos malloc and not the perl malloc, the
same way it would fail if I just compiled miniperl by hand.

After re-reading your e-mails I tried this​:
nomad% rm -f config.sh Policy.sh

------------------------->
nomad% sh Configure -D optimize=-g

On the make it blew up on the malloc again​:

CC-9 cc​: WARNING File = xsutils.c, Line = 26
  A "/*" appears inside a comment.

  * bundled lib/*.pm files is in a version-specific directory,
  ^

  `sh cflags libperl.a globals.o` globals.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  `sh cflags libperl.a perlio.o` perlio.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  rm -f libperl.a
  /bin/ar rcu libperl.a perl.o malloc.o gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o
  `sh cflags libperl.a miniperl` -DPERL_EXTERNAL_GLOB -o opmini.o op.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  /opt/ctl/bin/cc -o miniperl \
  miniperlmain.o opmini.o libperl.a -lnsl -lc -lcrypt
  ./miniperl -w -Ilib -MExporter -e 0 || make minitest
Corrupt malloc ptr 0xc at 0x4
Corrupt malloc ptr 0x0 at 0x63314
Corrupt malloc ptr 0x0 at 0x63414
Corrupt malloc ptr 0x63524 at 0x63514
Corrupt malloc ptr 0x63694 at 0x63614
Corrupt malloc ptr 0x14 at 0xc
Corrupt malloc ptr 0x0 at 0x63714
Corrupt malloc ptr 0x1c at 0x14
Corrupt malloc ptr 0x0 at 0x63694
Corrupt malloc ptr 0x24 at 0x1c
Corrupt malloc ptr 0x63534 at 0x63524
Corrupt malloc ptr 0x63894 at 0x63814
Corrupt malloc ptr 0x0 at 0x63914
Corrupt malloc ptr 0x0 at 0x63a14
Corrupt malloc ptr 0x0 at 0x63e14
Corrupt malloc ptr 0x63f54 at 0x63f14
Corrupt malloc ptr 0x63f94 at 0x63f54
Corrupt malloc ptr 0x0 at 0x64014
Corrupt malloc ptr 0x64134 at 0x64114
Corrupt malloc ptr 0x0 at 0x64214
Corrupt malloc ptr 0x2c at 0x24
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
sh​: 79665 Abort(coredump)
  rm -f lib/re.pm
  cat ext/re/re.pm > lib/re.pm
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
  cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
Corrupt malloc ptr 0x9 at 0x1
Corrupt malloc ptr 0x0 at 0x63441
Corrupt malloc ptr 0x0 at 0x63541
Corrupt malloc ptr 0x63651 at 0x63641
Corrupt malloc ptr 0x637c1 at 0x63741
Corrupt malloc ptr 0x11 at 0x9
Corrupt malloc ptr 0x0 at 0x63841
Corrupt malloc ptr 0x19 at 0x11
Corrupt malloc ptr 0x0 at 0x637c1
Corrupt malloc ptr 0x21 at 0x19
Corrupt malloc ptr 0x63661 at 0x63651
Corrupt malloc ptr 0x639c1 at 0x63941
Corrupt malloc ptr 0x0 at 0x63a41
Corrupt malloc ptr 0x0 at 0x63b41
Corrupt malloc ptr 0x0 at 0x63f41
Corrupt malloc ptr 0x64081 at 0x64041
Corrupt malloc ptr 0x0 at 0x64141
Corrupt malloc ptr 0x64261 at 0x64241
Corrupt malloc ptr 0x0 at 0x64341
Corrupt malloc ptr 0x29 at 0x21
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Make​: " cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty" terminated due to signal 6 (core dumped) (ignored)
  ./miniperl configpm configpm.tmp
Corrupt malloc ptr 0xf at 0x7
Corrupt malloc ptr 0x0 at 0x6330f
Corrupt malloc ptr 0x0 at 0x6340f
Corrupt malloc ptr 0x6351f at 0x6350f
Corrupt malloc ptr 0x6368f at 0x6360f
Corrupt malloc ptr 0x17 at 0xf
Corrupt malloc ptr 0x0 at 0x6370f
Corrupt malloc ptr 0x1f at 0x17
Corrupt malloc ptr 0x0 at 0x6368f
Corrupt malloc ptr 0x27 at 0x1f
Corrupt malloc ptr 0x6352f at 0x6351f
Corrupt malloc ptr 0x6388f at 0x6380f
Corrupt malloc ptr 0x0 at 0x6390f
Corrupt malloc ptr 0x0 at 0x63a0f
Corrupt malloc ptr 0x0 at 0x63e0f
Corrupt malloc ptr 0x63f4f at 0x63f0f
Corrupt malloc ptr 0x63f8f at 0x63f4f
Corrupt malloc ptr 0x0 at 0x6400f
Corrupt malloc ptr 0x6412f at 0x6410f
Corrupt malloc ptr 0x0 at 0x6420f
Corrupt malloc ptr 0x2f at 0x27
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Make​: " ./miniperl configpm configpm.tmp" terminated due to signal 6 (core dumped)

But I still did try the following​:
nomad% ./miniperl -Dm -e0
Corrupt malloc ptr 0xd at 0x5
Corrupt malloc ptr 0x0 at 0x6330d
Corrupt malloc ptr 0x0 at 0x6340d
Corrupt malloc ptr 0x6351d at 0x6350d
Corrupt malloc ptr 0x6368d at 0x6360d
Corrupt malloc ptr 0x15 at 0xd
Corrupt malloc ptr 0x0 at 0x6370d
Corrupt malloc ptr 0x1d at 0x15
Corrupt malloc ptr 0x0 at 0x6368d
Corrupt malloc ptr 0x25 at 0x1d
Corrupt malloc ptr 0x6352d at 0x6351d
Corrupt malloc ptr 0x6388d at 0x6380d
Corrupt malloc ptr 0x0 at 0x6390d
Corrupt malloc ptr 0x0 at 0x63a0d
Corrupt malloc ptr 0x0 at 0x63e0d
Corrupt malloc ptr 0x63f4d at 0x63f0d
Corrupt malloc ptr 0x63f8d at 0x63f4d
Corrupt malloc ptr 0x0 at 0x6400d
Corrupt malloc ptr 0x6412d at 0x6410d
Corrupt malloc ptr 0x0 at 0x6420d
Corrupt malloc ptr 0x2d at 0x25
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Abort (core dumped)

I have not looked at the core yet but I am guessing
it is the same problem we had before where the perl malloc
cannot handle the 64 bit system or word addressing.

Either way unless I misunderstand your instructions it
did not work using the perl malloc.

thanks,
john

On Thu, Feb 03, 2000 at 05​:57​:03PM -0600, John Salinas wrote​:

I did not rename config.sh here were the steps I went
through​:
rm -f config.sh Policy.sh
sh Configure

I did not see

sh Configure -D optimize=-g

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2000

From [Unknown Contact. See original ticket]

On Thu, Feb 03, 2000 at 06​:34​:20PM -0600, John Salinas wrote​:

It is there you did not read far enough down I will

I did and it is not. I think you did an analogue of

-D optimize="-D optimize=-g"

After re-reading your e-mails I tried this​:

nomad% sh Configure -D optimize=-g

Thanks.

CC-9 cc​: WARNING File = xsutils.c, Line = 26
A "/*" appears inside a comment.

* bundled lib/*.pm files is in a version-specific directory,
^

Folks, do we want to change this? I expect M$ compilers be as stupid
as that too...

But I still did try the following​:
nomad% ./miniperl -Dm -e0
Corrupt malloc ptr 0xd at 0x5
Corrupt malloc ptr 0x0 at 0x6330d
Corrupt malloc ptr 0x0 at 0x6340d

Hmm, it is reporting different errors now... Will think.

I have not looked at the core yet but I am guessing
it is the same problem we had before where the perl malloc
cannot handle the 64 bit system or word addressing.

Perl malloc can handle the 64 bit system or word addressing.

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 4, 2000

From [Unknown Contact. See original ticket]

On Thu, Feb 03, 2000 at 06​:34​:20PM -0600, John Salinas wrote​:

nomad% ./miniperl -Dm -e0

Stupid me! Of course one would not be able to debug such problems
with -Dm​: The problem is probably happening with very first malloc()s,
which happen long before the command-line options are processed.

Corrupt malloc ptr 0xd at 0x5
Corrupt malloc ptr 0x0 at 0x6330d
Corrupt malloc ptr 0x0 at 0x6340d

Looks like bugs in debugging code... And the debugging code looks
absolutely useless. Who wrote it? It just cannot happen (see below)​:
if p is not aligned (at 0x5), then the access to *p would segfault...

I made some minor adjustment to the debuggging code.

Please retry with

Inline Patch
--- ./malloc.c~	Thu Jan 27 17:53:27 2000
+++ ./malloc.c	Fri Feb  4 17:42:12 2000
@@ -1034,8 +1034,14 @@ Perl_malloc(register size_t nbytes)
 	if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1)) {
 	    dTHXo;
 	    PerlIO_printf(PerlIO_stderr(),
-			  "Corrupt malloc ptr 0x%lx at 0x%"UVxf"\n",
-			  (unsigned long)*((int*)p),PTR2UV(p));
+			  "Unaligned pointer in the free chain 0x%"UVxf"\n",
+			  PTR2UV(p));
+	}
+	if ((PTR2UV(p->ov_next)) & (MEM_ALIGNBYTES - 1)) {
+	    dTHXo;
+	    PerlIO_printf(PerlIO_stderr(),
+			  "Unaligned `next' pointer in the free chain 0x"UVxf" at 0x%"UVxf"\n",
+			  PTR2UV(p->ov_next),PTR2UV(p));
 	}
 #endif
   	nextf[bucket] = p->ov_next;

This would not allow us go closer to *your* problem, but is one of necessary steps\. The next step is to insert PL\_debug |= 128 at the beginning of miniperlmain\.c\.\.\.

Ilya

P.S. Whoever edited malloc.c make it unusable outside of Perl... Sigh...

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From [Unknown Contact. See original ticket]

Changing the debug print definately made a difference. I was
not sure how much of this information you needed to I tried
to put it all in the e-mail.

short version​:
nomad% ./miniperl -Dm -e0
Corrupt malloc ptr 0xa at 0x2
Unaligned `next' pointer in the free chain 0xx at 0xa
Corrupt malloc ptr 0x0 at 0x693f2
Corrupt malloc ptr 0x0 at 0x694f2
Corrupt malloc ptr 0x69602 at 0x695f2

I did not try to put the PL_debug |= 128 in miniperlmain.c
yet. Hope this helps - let me know what I should try
next.

thanks,
john

################################################################################
#################### malloc.c changes ################
################################################################################
--- -rwx------ 1 jsalinas craysrc 59665 Oct 27 16​:22 malloc.old
+++ -rw------- 1 jsalinas craysrc 59929 Feb 11 10​:44 malloc.c

@​@​ -1034,8 +1034,14 @​@​ Perl_malloc(register size_t nbytes)
  if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1)) {
  dTHXo;
  PerlIO_printf(PerlIO_stderr(),
- "Corrupt malloc ptr 0x%lx at 0x%"UVxf"\n",
- (unsigned long)*((int*)p),PTR2UV(p));
+ "Unaligned pointer in the free chain 0x%"UVxf"\n",
+ PTR2UV(p);
+ }
+ if ((PTR2UV(p->ov_next)) & (MEM_ALIGNBYTES - 1)) {
+ dTHXo;
+ PerlIO_printf(PerlIO_stderr(),
+ "Unaligned `next' pointer in the free chain 0x"UVxf" at 0x%"UVxf"\n",
+ PTR2UV(p->ov_next),PTR2UV(p));
  }
#endif

################################################################################
#################### running make ################
################################################################################
Subject​: Re​: [ID 20000202.013] unicos compile problem with 5.005_56

nomad% rm -f config.sh Policy.sh
nomad% sh Configure -D optimize=-g
nomad% make
  ...................................
  `sh cflags libperl.a miniperl` -DPERL_EXTERNAL_GLOB -o opmini.o op.c
  CCCMD = /opt/ctl/bin/cc -DPERL_CORE -c -DDEBUGGING -g
  /opt/ctl/bin/cc -o miniperl \
  miniperlmain.o opmini.o libperl.a -lnsl -lc -lcrypt
  ./miniperl -w -Ilib -MExporter -e 0 || make minitest
Corrupt malloc ptr 0x9 at 0x1
Unaligned `next' pointer in the free chain 0xx at 0x9
Corrupt malloc ptr 0x0 at 0x693f9
Corrupt malloc ptr 0x0 at 0x694f9
Corrupt malloc ptr 0x69609 at 0x695f9
Unaligned `next' pointer in the free chain 0xx at 0x69609
Corrupt malloc ptr 0x69779 at 0x696f9
Unaligned `next' pointer in the free chain 0xx at 0x69779
Corrupt malloc ptr 0x11 at 0x9
Unaligned `next' pointer in the free chain 0xx at 0x11
Corrupt malloc ptr 0x0 at 0x697f9
Corrupt malloc ptr 0x19 at 0x11
Unaligned `next' pointer in the free chain 0xx at 0x19
Corrupt malloc ptr 0x0 at 0x69779
Corrupt malloc ptr 0x21 at 0x19
Unaligned `next' pointer in the free chain 0xx at 0x21
Corrupt malloc ptr 0x69619 at 0x69609
Unaligned `next' pointer in the free chain 0xx at 0x69619
Corrupt malloc ptr 0x69979 at 0x698f9
Unaligned `next' pointer in the free chain 0xx at 0x69979
Corrupt malloc ptr 0x0 at 0x699f9
Corrupt malloc ptr 0x0 at 0x69af9
Corrupt malloc ptr 0x0 at 0x69ef9
Corrupt malloc ptr 0x6a039 at 0x69ff9
Unaligned `next' pointer in the free chain 0xx at 0x6a039
Corrupt malloc ptr 0x6a079 at 0x6a039
Unaligned `next' pointer in the free chain 0xx at 0x6a079
Corrupt malloc ptr 0x0 at 0x6a0f9
Corrupt malloc ptr 0x6a219 at 0x6a1f9
Unaligned `next' pointer in the free chain 0xx at 0x6a219
Corrupt malloc ptr 0x0 at 0x6a2f9
Corrupt malloc ptr 0x29 at 0x21
Unaligned `next' pointer in the free chain 0xx at 0x29
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
sh​: 37888 Abort(coredump)
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm.
  cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
Corrupt malloc ptr 0xe at 0x6
Unaligned `next' pointer in the free chain 0xx at 0xe
Corrupt malloc ptr 0x0 at 0x695a6
Corrupt malloc ptr 0x0 at 0x696a6
Corrupt malloc ptr 0x697b6 at 0x697a6
Unaligned `next' pointer in the free chain 0xx at 0x697b6
Corrupt malloc ptr 0x69926 at 0x698a6
Unaligned `next' pointer in the free chain 0xx at 0x69926
Corrupt malloc ptr 0x16 at 0xe
Unaligned `next' pointer in the free chain 0xx at 0x16
Corrupt malloc ptr 0x0 at 0x699a6
Corrupt malloc ptr 0x1e at 0x16
Unaligned `next' pointer in the free chain 0xx at 0x1e
Corrupt malloc ptr 0x0 at 0x69926
Corrupt malloc ptr 0x26 at 0x1e
Unaligned `next' pointer in the free chain 0xx at 0x26
Corrupt malloc ptr 0x697c6 at 0x697b6
Unaligned `next' pointer in the free chain 0xx at 0x697c6
Corrupt malloc ptr 0x69b26 at 0x69aa6
Unaligned `next' pointer in the free chain 0xx at 0x69b26
Corrupt malloc ptr 0x0 at 0x69ba6
Corrupt malloc ptr 0x0 at 0x69ca6
Corrupt malloc ptr 0x0 at 0x6a0a6
Corrupt malloc ptr 0x6a1e6 at 0x6a1a6
Unaligned `next' pointer in the free chain 0xx at 0x6a1e6
Corrupt malloc ptr 0x6a226 at 0x6a1e6
Unaligned `next' pointer in the free chain 0xx at 0x6a226
Corrupt malloc ptr 0x0 at 0x6a2a6
Corrupt malloc ptr 0x6a3c6 at 0x6a3a6
Unaligned `next' pointer in the free chain 0xx at 0x6a3c6
Corrupt malloc ptr 0x0 at 0x6a4a6
Corrupt malloc ptr 0x2e at 0x26
Unaligned `next' pointer in the free chain 0xx at 0x2e
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Make​: " cd t && (rm -f perl; /bin/ln -s ../miniperl perl) \
  && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty" terminated due to signal 6 (core dumped) (ignored)
  ./miniperl configpm configpm.tmp
Corrupt malloc ptr 0xc at 0x4
Unaligned `next' pointer in the free chain 0xx at 0xc
Corrupt malloc ptr 0x0 at 0x693f4
Corrupt malloc ptr 0x0 at 0x694f4
Corrupt malloc ptr 0x69604 at 0x695f4
Unaligned `next' pointer in the free chain 0xx at 0x69604
Corrupt malloc ptr 0x69774 at 0x696f4
Unaligned `next' pointer in the free chain 0xx at 0x69774
Corrupt malloc ptr 0x14 at 0xc
Unaligned `next' pointer in the free chain 0xx at 0x14
Corrupt malloc ptr 0x0 at 0x697f4
Corrupt malloc ptr 0x1c at 0x14
Unaligned `next' pointer in the free chain 0xx at 0x1c
Corrupt malloc ptr 0x0 at 0x69774
Corrupt malloc ptr 0x24 at 0x1c
Unaligned `next' pointer in the free chain 0xx at 0x24
Corrupt malloc ptr 0x69614 at 0x69604
Unaligned `next' pointer in the free chain 0xx at 0x69614
Corrupt malloc ptr 0x69974 at 0x698f4
Unaligned `next' pointer in the free chain 0xx at 0x69974
Corrupt malloc ptr 0x0 at 0x699f4
Corrupt malloc ptr 0x0 at 0x69af4
Corrupt malloc ptr 0x0 at 0x69ef4
Corrupt malloc ptr 0x6a034 at 0x69ff4
Unaligned `next' pointer in the free chain 0xx at 0x6a034
Corrupt malloc ptr 0x6a074 at 0x6a034
Unaligned `next' pointer in the free chain 0xx at 0x6a074
Corrupt malloc ptr 0x0 at 0x6a0f4
Corrupt malloc ptr 0x6a214 at 0x6a1f4
Unaligned `next' pointer in the free chain 0xx at 0x6a214
Corrupt malloc ptr 0x0 at 0x6a2f4
Corrupt malloc ptr 0x2c at 0x24
Unaligned `next' pointer in the free chain 0xx at 0x2c
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Make​: " ./miniperl configpm configpm.tmp" terminated due to signal 6 (core dumped)

################################################################################
#################### running miniperl -Dm -e0 ################
################################################################################
Subject​: Re​: [ID 20000202.013] unicos compile problem with 5.005_56

nomad% ./miniperl -Dm -e0
Corrupt malloc ptr 0xa at 0x2
Unaligned `next' pointer in the free chain 0xx at 0xa
Corrupt malloc ptr 0x0 at 0x693f2
Corrupt malloc ptr 0x0 at 0x694f2
Corrupt malloc ptr 0x69602 at 0x695f2
Unaligned `next' pointer in the free chain 0xx at 0x69602
Corrupt malloc ptr 0x69772 at 0x696f2
Unaligned `next' pointer in the free chain 0xx at 0x69772
Corrupt malloc ptr 0x12 at 0xa
Unaligned `next' pointer in the free chain 0xx at 0x12
Corrupt malloc ptr 0x0 at 0x697f2
Corrupt malloc ptr 0x1a at 0x12
Unaligned `next' pointer in the free chain 0xx at 0x1a
Corrupt malloc ptr 0x0 at 0x69772
Corrupt malloc ptr 0x22 at 0x1a
Unaligned `next' pointer in the free chain 0xx at 0x22
Corrupt malloc ptr 0x69612 at 0x69602
Unaligned `next' pointer in the free chain 0xx at 0x69612
Corrupt malloc ptr 0x69972 at 0x698f2
Unaligned `next' pointer in the free chain 0xx at 0x69972
Corrupt malloc ptr 0x0 at 0x699f2
Corrupt malloc ptr 0x0 at 0x69af2
Corrupt malloc ptr 0x0 at 0x69ef2
Corrupt malloc ptr 0x6a032 at 0x69ff2
Unaligned `next' pointer in the free chain 0xx at 0x6a032
Corrupt malloc ptr 0x6a072 at 0x6a032
Unaligned `next' pointer in the free chain 0xx at 0x6a072
Corrupt malloc ptr 0x0 at 0x6a0f2
Corrupt malloc ptr 0x6a212 at 0x6a1f2
Unaligned `next' pointer in the free chain 0xx at 0x6a212
Corrupt malloc ptr 0x0 at 0x6a2f2
Corrupt malloc ptr 0x2a at 0x22
Unaligned `next' pointer in the free chain 0xx at 0x2a
assertion botched (chunk's tail overwrite?)​: *((char *)((caddr_t)ovp + nbytes - sizeof (unsigned int) + i)) == 0x55
Abort (core dumped)

################################################################################
#################### miniperl's Core ################
################################################################################

***** START OF SYMBOLIC DUMP *****

LIST OF PROCESS STATES

CPUs 42864​: Signal SIGABRT <Abort>

DISPLAYING CPUs 42864​: Signal SIGABRT <Abort>

Signal SIGABRT in routine _lwp_killm at address 0p1075401c
_lwp_killm was called by raise at line 32 (address 0p1072247c)
raise was called by abort at line 143 (address 0p773637b)
abort was called by botch at line 952 (address 0p100416c)
botch was called by free at line 1529 (address 0p102402c)
free was called by setlocale at line 259 (address 0p1013445b)
setlocale was called by perl_init_i18nl10n at line 687 (address 0p305523c)
perl_init_i18nl10n was called by perl_construct at line 203 (address 0p57305a)
perl_construct was called by main at line 47 (address 0p1315c)
main was called by $START$ at line 350 (address 0p1204c)

***** END OF SYMBOLIC DUMP *****

################################################################################
#################### OLD MESSAGE ################
################################################################################
Subject​: Re​: [ID 20000202.013] unicos compile problem with 5.005_56

On Thu, Feb 03, 2000 at 06​:34​:20PM -0600, John Salinas wrote​:

nomad% ./miniperl -Dm -e0

Stupid me! Of course one would not be able to debug such problems
with -Dm​: The problem is probably happening with very first malloc()s,
which happen long before the command-line options are processed.

Corrupt malloc ptr 0xd at 0x5
Corrupt malloc ptr 0x0 at 0x6330d
Corrupt malloc ptr 0x0 at 0x6340d

Looks like bugs in debugging code... And the debugging code looks
absolutely useless. Who wrote it? It just cannot happen (see below)​:
if p is not aligned (at 0x5), then the access to *p would segfault...

I made some minor adjustment to the debuggging code.

Please retry with

--- ./malloc.c~ Thu Jan 27 17​:53​:27 2000
+++ ./malloc.c Fri Feb 4 17​:42​:12 2000
@​@​ -1034,8 +1034,14 @​@​ Perl_malloc(register size_t nbytes)
if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1)) {
dTHXo;
PerlIO_printf(PerlIO_stderr(),
- "Corrupt malloc ptr 0x%lx at 0x%"UVxf"\n",
- (unsigned long)*((int*)p),PTR2UV(p));
+ "Unaligned pointer in the free chain 0x%"UVxf"\n",
+ PTR2UV(p));
+ }
+ if ((PTR2UV(p->ov_next)) & (MEM_ALIGNBYTES - 1)) {
+ dTHXo;
+ PerlIO_printf(PerlIO_stderr(),
+ "Unaligned `next' pointer in the free chain 0x"UVxf" at 0x%"UVxf"\n",
+ PTR2UV(p->ov_next),PTR2UV(p));
}
#endif
nextf[bucket] = p->ov_next;

This would not allow us go closer to *your* problem, but is one of
necessary steps. The next step is to insert PL_debug |= 128 at the
beginning of miniperlmain.c...

Ilya

P.S. Whoever edited malloc.c make it unusable outside of Perl... Sigh...

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From [Unknown Contact. See original ticket]

John Salinas writes​:

Changing the debug print definately made a difference. I was
not sure how much of this information you needed to I tried
to put it all in the e-mail.

Thank you for persisting on this. I was afraid that you gave up...

short version​:
nomad% ./miniperl -Dm -e0
Corrupt malloc ptr 0xa at 0x2
Unaligned `next' pointer in the free chain 0xx at 0xa
Corrupt malloc ptr 0x0 at 0x693f2
Corrupt malloc ptr 0x0 at 0x694f2
Corrupt malloc ptr 0x69602 at 0x695f2

I'm puzzled. After the patch there is no code which would emit
"Corrupt ..." message.

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From [Unknown Contact. See original ticket]

John Salinas writes​:

It seems I have run into yet another snag trying to install
perl on a large CRAY PVP (parallel vector platform) running
unicos 10.0.0.6 with perl 5.005.63.

Btw, you did not send us the results of running ./myconfig.

I suspect that you got size_of_ptr being 8, but size_of_uv being 4.

[Unfortunately, Configure maintainers did not make it easy to deduce
  size_of_uv from the output of myconfig, but try to make an educated
  guess, or run an appropriate C file through the preprocessor.

Perl (including Perl's malloc) assumes that IV is large enough to keep
pointers.

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From @jhi

Ilya Zakharevich writes​:

John Salinas writes​:

It seems I have run into yet another snag trying to install
perl on a large CRAY PVP (parallel vector platform) running
unicos 10.0.0.6 with perl 5.005.63.

Btw, you did not send us the results of running ./myconfig.

I suspect that you got size_of_ptr being 8, but size_of_uv being 4.

[Unfortunately, Configure maintainers did not make it easy to deduce

Yes, we did. Configure (config.sh, config.h, %Config) has
uvsize/UVSIZE these days. It's just myconfig which doesn't output the info.

(I doubt very much uvsize being 4, in Crays all but chars are 8 bytes)

size_of_uv from the output of myconfig, but try to make an educated
guess, or run an appropriate C file through the preprocessor.

Perl (including Perl's malloc) assumes that IV is large enough to keep
pointers.

Ilya

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From [Unknown Contact. See original ticket]

Okay here is the myconfig output​:

nomad% ./myconfig
Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration​:
  Platform​:
  osname=unicos, osvers=10.0.0gy, archname=CRAY_TS-unicos
  uname='sn7025 nomad 10.0.0gy d10.117 cray ts '
  config_args='-D optimize=-g'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  use64bits=define usemultiplicity=undef
  Compiler​:
  cc='/opt/ctl/bin/cc', optimize='-g', gccversion=
  cppflags='-DDEBUGGING'
  ccflags ='-DDEBUGGING'
  stdchar='unsigned char', d_stdstdio=define, usevfork=false
  intsize=8, longsize=8, ptrsize=8, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='ld', ldflags =''
  libpth=/lib /usr/lib
  libs=-lnsl -lc -lcrypt
  libc=/lib/libc.a, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
  cccdlflags='', lddlflags=''

As well as some liens from the config.sh

uvoformat='"o"'
uvsize='8'
uvtype='unsigned int'
uvuformat='"u"'
uvxformat='"x"'
vendorbin=''
vendorbinexp=''
vendorlib=''
vendorlibexp=''
vendorprefix=''
vendorprefixexp=''
version='5.00563'

I tried to compare the perl malloc.c to the
unicos malloc.c but they seem to be coming from
different worlds.

thanks,
john

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From [Unknown Contact. See original ticket]

On Fri, Feb 11, 2000 at 04​:23​:06PM -0600, John Salinas wrote​:

Okay here is the myconfig output​:

hint=recommended\, useposix=true\, d\_sigaction=define
usethreads=undef useperlio=undef d\_sfio=undef
use64bits=define usemultiplicity=undef

Compiler​:
cc='/opt/ctl/bin/cc', optimize='-g', gccversion=
cppflags='-DDEBUGGING'
ccflags ='-DDEBUGGING'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=8, longsize=8, ptrsize=8, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=y, prototype=define

Looks very reasonable indeed...

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2000

From [Unknown Contact. See original ticket]

On Sat, Feb 12, 2000 at 12​:17​:26AM +0200, Jarkko Hietaniemi wrote​:

[Unfortunately, Configure maintainers did not make it easy to deduce

Yes, we did. Configure (config.sh, config.h, %Config) has
uvsize/UVSIZE these days. It's just myconfig which doesn't output the info.

Oh, thank you a lot, and sorry for not keeping in sync with this stuff...
Ilya

@p5pRT
Copy link
Author

p5pRT commented Mar 6, 2000

From [Unknown Contact. See original ticket]

Any thoughts about this now I was willing to try something
else if anyone else had ideas. Would it help if someone
had some time on one of the crays to look at this problem?

thanks,
john

Forwarded message​:

From ilya@​math.ohio-state.edu Fri Feb 11 16​:25​:41 2000
Date​: Fri, 11 Feb 2000 17​:25​:08 -0500
From​: Ilya Zakharevich <ilya@​math.ohio-state.edu>
To​: John Salinas <jsalinas@​sgi.com>
Cc​: perl5-porters@​perl.org
Subject​: Re​: [ID 20000202.013] unicos compile problem with 5.005_56
Message-ID​: <20000211172508.A2955@​monk.mps.ohio-state.edu>
References​: <200002112206.RAA02853@​monk.mps.ohio-state.edu> <200002112223.QAA28338@​gem.americas.sgi.com>
Mime-Version​: 1.0
Content-Type​: text/plain; charset=us-ascii
X-Mailer​: Mutt 1.0i
In-Reply-To​: <200002112223.QAA28338@​gem.americas.sgi.com>; from jsalinas@​sgi.com on Fri, Feb 11, 2000 at 04​:23​:06PM -0600

On Fri, Feb 11, 2000 at 04​:23​:06PM -0600, John Salinas wrote​:

Okay here is the myconfig output​:

hint=recommended\, useposix=true\, d\_sigaction=define
usethreads=undef useperlio=undef d\_sfio=undef
use64bits=define usemultiplicity=undef

Compiler​:
cc='/opt/ctl/bin/cc', optimize='-g', gccversion=
cppflags='-DDEBUGGING'
ccflags ='-DDEBUGGING'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=8, longsize=8, ptrsize=8, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=y, prototype=define

Looks very reasonable indeed...

Ilya

@p5pRT
Copy link
Author

p5pRT commented Feb 10, 2003

arthur@contiller.se - Status changed from 'resolved' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 10, 2003

arthur@contiller.se - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant