blocked on mallooc

This is a discussion on blocked on mallooc within the Linux Administration forums, part of the Linux Forums category; I tried to run an application on Linux (kernel 2.4.20-8smp). the execution is blocked on a mollac( ) ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-11-2004
Shuqing Wu
 
Posts: n/a
Default blocked on mallooc

I tried to run an application on Linux (kernel 2.4.20-8smp).
the execution is blocked on a mollac( ) call. Any hints?
Is there any where can setup memory per process?
Thanks in advance.

Shuqing



Reply With Quote
  #2 (permalink)  
Old 01-12-2004
Cameron Kerr
 
Posts: n/a
Default Re: blocked on mallooc

Shuqing Wu <swu@sympatico.ca> wrote:
> I tried to run an application on Linux (kernel 2.4.20-8smp).
> the execution is blocked on a mollac( ) call. Any hints?
> Is there any where can setup memory per process?
> Thanks in advance.


How do you know its blocked in malloc?

What if you do the following.

Use this form if its running already, before it blocks

strace -p <PID> -f


Otherwise, use this form

mkfifo /tmp/trace.fifo
strace -o / -f <COMMAND>
#Do this in another window
cat /tmp/trace.fifo

(Using a fifo in this way means that the trace output doesn't obscure
the process output).

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
  #3 (permalink)  
Old 01-13-2004
Shuqing Wu
 
Posts: n/a
Default Re: blocked on mallooc

> > I tried to run an application on Linux (kernel 2.4.20-8smp).
> > the execution is blocked on a mollac( ) call. Any hints?
> > Is there any where can setup memory per process?
> > Thanks in advance.

>
> How do you know its blocked in malloc?
>
> What if you do the following.
>
> Use this form if its running already, before it blocks
>
> strace -p <PID> -f
>
>
> Otherwise, use this form
>
> mkfifo /tmp/trace.fifo
> strace -o / -f <COMMAND>
> #Do this in another window
> cat /tmp/trace.fifo
>
> (Using a fifo in this way means that the trace output doesn't obscure
> the process output).
>


Here is the stack trace:
Thread 1 (Thread 16384 (LWP 8442)):
#0 0x401f9917 in malloc_consolidate () from /lib/i686/libc.so.6
#1 0x401f8f77 in _int_malloc () from /lib/i686/libc.so.6
#2 0x401f8171 in malloc () from /lib/i686/libc.so.6
#3 0x08158d56 in AllocSetContextCreate ()
#4 0x08085201 in AtStart_Memory ()
#5 0x08085621 in StartTransaction ()
#6 0x08085c01 in StartTransactionCommand ()
#7 0x0811091e in pg_exec_query_string ()
#8 0x08111b3c in PostgresMain ()
#9 0x080f82fc in DoBackend ()
#10 0x080f7e7e in BackendStartup ()
#11 0x080f7021 in ServerLoop ()
#12 0x080f6a50 in PostmasterMain ()
#13 0x080d7a24 in main ()
#14 0x4019aa07 in __libc_start_main () from /lib/i686/libc.so.6
#0 0x401f9917 in malloc_consolidate () from /lib/i686/libc.so.6

Shuqing



Reply With Quote
  #4 (permalink)  
Old 01-13-2004
Cameron Kerr
 
Posts: n/a
Default Re: blocked on mallooc

Shuqing Wu <swu@sympatico.ca> wrote:
>> > I tried to run an application on Linux (kernel 2.4.20-8smp).
>> > the execution is blocked on a mollac( ) call. Any hints?


What if you boot the machine into single CPU mode and see if it works.
(boot arg is "nosmp")

Did you compile it yourself?

What compiler and settings did you use?

Do you have any malloc checking software installed, such as stackguard
(I'm guessing you don't since its coming from /lib/i686/libc.so.6)

> Here is the stack trace:
> Thread 1 (Thread 16384 (LWP 8442)):
> #0 0x401f9917 in malloc_consolidate () from /lib/i686/libc.so.6
> #1 0x401f8f77 in _int_malloc () from /lib/i686/libc.so.6
> #2 0x401f8171 in malloc () from /lib/i686/libc.so.6


I think you might have better success submitting a bug report to either
PostgreSQL and/or GlibC.

Hmmm, I notice you're using threads. What Distro/Version, and threading
library are you using?

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
  #5 (permalink)  
Old 01-13-2004
Shuqing Wu
 
Posts: n/a
Default Re: blocked on mallooc

> What if you boot the machine into single CPU mode and see if it works.
> (boot arg is "nosmp")
>
> Did you compile it yourself?


No, I am using machines in the university. I will try to talk to system
admin.
That is the possible reason, since no one else complain about this problem.

> What compiler and settings did you use?


gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

> Do you have any malloc checking software installed, such as stackguard
> (I'm guessing you don't since its coming from /lib/i686/libc.so.6)
>
> > Here is the stack trace:
> > Thread 1 (Thread 16384 (LWP 8442)):
> > #0 0x401f9917 in malloc_consolidate () from /lib/i686/libc.so.6
> > #1 0x401f8f77 in _int_malloc () from /lib/i686/libc.so.6
> > #2 0x401f8171 in malloc () from /lib/i686/libc.so.6

>
> I think you might have better success submitting a bug report to either
> PostgreSQL and/or GlibC.
>
> Hmmm, I notice you're using threads. What Distro/Version, and threading
> library are you using?


I am not using thread directly. However, I am using Spread, a group
communication
tool. It uses pthread. How to get the version of pthread?

I tried valgrind. The application works fine under it. Is the problem from
pthread
or even malloc? I look at the log, it says valgrind uses its own pthread
library and
maybe malloc instead.


Shuqing


Reply With Quote
  #6 (permalink)  
Old 01-13-2004
Cameron Kerr
 
Posts: n/a
Default Re: blocked on mallooc

All things considered, I think you need to start talking to the software
creators about the existance of the bug.

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:26 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0