[osol-discuss] libc thread failure: _thread_setschedparam_main() fails

2011-03-19 Thread dengning
I wrote a new memory allocation function to replace the glibc malloc() in 
solaris 10. 

It compiles well, but when I try to run it, I get the following message:

*** libc thread failure: _thread_setschedparam_main() fails

I've traced the program and found the error occurs at pthread_mutex_lock(). I 
don't know 

Do you have any experience or suggestion on solving this problem? 

Thank you in advance.
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] libc thread failure: _thread_setschedparam_main() fails

2011-03-19 Thread Ian Collins

 On 03/19/11 08:33 PM, dengning wrote:

I wrote a new memory allocation function to replace the glibc malloc() in 
solaris 10.


(Open)Solaris does not use glibc.

There are a number of alternative allocators provided (libumem for 
example), do any of these meet your needs?


--
Ian.

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] libc thread failure: _thread_setschedparam_main() fails

2011-03-19 Thread 邓宁
Actually, I am writing a new spm_malloc() interface for some academic
research reason. The spm_malloc() is going to allocate a small on-chip
memory for multicore.

it looks like: void *spm_malloc(long bytes), I test the function in many
programs, it works ok.

In this example, the malloc() is called like this:

struct queue {
  int head, tail;
  void ** data;
  int size;
  int threads;
  int end_count;
#ifdef PARALLEL
  pthread_mutex_t mutex;
  pthread_cond_t empty, full;
#endif //PARALLEL
};

struct queue *chunk_que;

chunk_que = spm_normal_malloc(sizeof(struct queue) * nqueues);

pthread_mutex_init(que-mutex, NULL);

pthread_mutex_lock(que-mutex);  //The error occurs here!
...

Can you tell me how the malloc() function will do some relationship with the
pthread_mutex_lock() function? I think that is the point. Many thanks.

2011/3/19 Ian Collins i...@ianshome.com

  On 03/19/11 08:33 PM, dengning wrote:

 I wrote a new memory allocation function to replace the glibc malloc() in
 solaris 10.

  (Open)Solaris does not use glibc.

 There are a number of alternative allocators provided (libumem for
 example), do any of these meet your needs?

 --
 Ian.




-- 
Regards
Deng Ning (邓 宁)

School Of Computer Science and Technology
Beijng Institute of Technology, China, 100081
dunning2...@gmail.com
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] eSATA works fine?

2011-03-19 Thread Orvar Korvar
I always install GRUB on the Solaris partition, never on MBR - because if there 
is a problem with GRUB, it is just a matter of activating the Solaris 
partition. 

If I install GRUB on MBR and if there is a problem, I have to reinstall GRUB, 
fix the configuration file, etc - much more work. It is easier to just activate 
the Solaris partition.
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] libc thread failure: _thread_setschedparam_main() fails

2011-03-19 Thread Roger A. Faulkner



Date: Sat, 19 Mar 2011 16:32:53 +0800
From: ??dunning2...@gmail.com
To: Ian Collinsi...@ianshome.com,
opensolaris-discuss@opensolaris.org
Subject: Re: [osol-discuss] libc thread failure:
_thread_setschedparam_main() fails
Message-ID:
AANLkTi=qoytk+ck_q+nvi0hnydoysrgvbwkz0axxt...@mail.gmail.com
Content-Type: text/plain; charset=gb2312

Actually, I am writing a new spm_malloc() interface for some academic
research reason. The spm_malloc() is going to allocate a small on-chip
memory for multicore.

it looks like: void *spm_malloc(long bytes), I test the function in many
programs, it works ok.

In this example, the malloc() is called like this:

struct queue {
   int head, tail;
   void ** data;
   int size;
   int threads;
   int end_count;
#ifdef PARALLEL
   pthread_mutex_t mutex;
   pthread_cond_t empty, full;
#endif //PARALLEL
};

struct queue *chunk_que;

chunk_que = spm_normal_malloc(sizeof(struct queue) * nqueues);

pthread_mutex_init(que-mutex, NULL);

pthread_mutex_lock(que-mutex);  //The error occurs here!
...

Can you tell me how the malloc() function will do some relationship with the
pthread_mutex_lock() function? I think that is the point. Many thanks.


The confusing message is caused (in Solaris 10) by calling
pthread_mutex_lock() on an uninitialized mutex, due to
random garbage in the mutex.

Go check your test program.  It is not doing what you think it is.
Check the return code from your call to pthread_mutex_init().

If you want more help, post a complete test program, not just
the snippets shown above.

Roger Faulkner

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] machine drops off the network

2011-03-19 Thread Matt Harrison

Hi all,

Things have been going pretty well with my home fileserver, but recently 
and I think increasingly, the system is dropping off the network for 
just long enough to disrupt connections.


It only really happens when copying large amounts of data, for example 
an 8 gig folder of mixed file sizes.


Client: Windows 7 x64
Server: zfs/cifs on SunOS exodus 5.11 snv_133 i86pc i386 i86pc Solaris

I dont run any other client operating systems so I can't test with any 
others. In the middle of a copy (or right at the beginning, its random) 
i'll get a message saying the network path couldn't be found. After I 
convince windows to cancel and try to access the share myself, it's all 
fine.


My NFS shares however are a bigger problem, I've never found NFS to be 
very tolerant of things like this and its causing some big headaches for me.


I'm no expert in tracking down this kind of stuff so any pointers are 
much appreciated.


Thanks

Matt
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] machine drops off the network

2011-03-19 Thread Andre Lue
What model motherboard are you using? I suspect it's probably a nic driver 
issue.
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] libc thread failure: _thread_setschedparam_main() fails

2011-03-19 Thread John Martin



struct queue *chunk_que;

chunk_que = spm_normal_malloc(sizeof(struct queue) * nqueues);

pthread_mutex_init(que-mutex, NULL);

pthread_mutex_lock(que-mutex); //The error occurs here!



Go check your test program. It is not doing what you think it is.
Check the return code from your call to pthread_mutex_init().


Also verify pthread_mutex_init() isn't being called more than once.
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org