Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 63713
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 63734
Assigned To: Gentoo Linux bug wranglers <bug-wranglers@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Canal Vorfeed <canalvorfeed@mail.ru>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 63713 depends on: Show dependency tree
Bug 63713 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-09-11 16:03 0000
While investigating obscure mono bug #54603 (I wanted to play with mono and I
have nptl-based gentoo installation) I've tried to reproduce deadlock without
boehm's gc and without mono. Successfully. Simple programs (see below)
deadlocks quite nicely).

Since threads are used in quite a few programs I think it's not some small mono
problem anymore so I decided to create new, separe bugreport for it.

#include <pthread.h>
#include <stdio.h>

void *thread_function (void *args)
{
        int j = 0;
        char *str;
        printf("starting thread!\n");
        for (j; j < 24; j++)
        {
                str = (char *)malloc(240);
                printf("malloc in thread !\n");
        }
        pthread_yield();
}

int main (void)
{
        int i;
        pthread_t thread;
        char *str;
        for (i=0;i<1000;i++)
        {
                pthread_create( &thread, NULL, thread_function, (void *)i);
                pthread_yield();
                str = (char *)malloc(240);
                printf("%d threads\n", i);
        }
        sleep(10);
}

$ ./testpgm | grep 'malloc in thread' | wc -l
9168

Without ntpl I've got expected 24000 ...

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r0,
2.6.9-rc1-mm4)
=================================================================
System uname: 2.6.9-rc1-mm4 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -march=pentium4 -funroll-loops -ffast-math
-fomit-frame-pointer -ffloat-store -fforce-addr -ftracer -mmmx -msse -msse2
-mfpmath=sse"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium4 -funroll-loops -ffast-math
-fomit-frame-pointer -ffloat-store -fforce-addr -ftracer -mmmx -msse -msse2
-mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/
ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.spb.ru/rsync"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apm arts avi berkdb bitmap-fonts crypt cups encode foomaticdb gdbm gif
gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg ncurses
nls nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline
sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xprint xv zlib"

------- Comment #1 From Canal Vorfeed 2004-09-11 21:41:35 0000 -------

*** This bug has been marked as a duplicate of 63734 ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug