blocked on mallooc - Linux

This is a discussion on blocked on mallooc - Linux ; 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 to Thread
Results 1 to 6 of 6

Thread: blocked on mallooc

  1. 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




  2. Re: blocked on mallooc

    Shuqing Wu 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 -f


    Otherwise, use this form

    mkfifo /tmp/trace.fifo
    strace -o / -f
    #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!

  3. 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 -f
    >
    >
    > Otherwise, use this form
    >
    > mkfifo /tmp/trace.fifo
    > strace -o / -f
    > #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




  4. Re: blocked on mallooc

    Shuqing Wu 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!

  5. 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



  6. 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 to Thread