List:General Discussion« Previous MessageNext Message »
From:Daniel Koch Date:February 4 2000 3:27am
Subject:Re: mysql 3.22.30 problem on IRIX 6.5.5f
View as plain text  
Don Badrak wrote:

> Sasha,
>
> On Wed, 2 Feb 2000 sasha@stripped wrote:
>
> > dbadrak@stripped wrote:
> > >
> > > >Description:
> > >
> > > After building 3.22.30 the same way I've been doing for many versions, I
> get this when
> > > trying to use it:
> > >
> > > dbadrak@sequoia [~] mysql -p
> > > Enter password:
> > > ERROR 1135: Can't create a new thread (errno 1). If you are not out of
> available memory, you can consult the manual for a possible OS-dependent bug
> > >
> > > On another system (6.5.3f), the server wouldn't even start.  This is what I
> had in the errror
> > > log:
> > >
> > > 000114 14:30:31  Can't create interrupt-thread (error 1, errno: 1)
> > >
> > On the second thought, I think I have an idea of what the problem is -- can you
> > check your documentations to see if you need to do configure your system in a
> > certain way to be able to call pthread_create() -- does you man pthread_create
> > say anything about any kind of special permissions or kernel options? If there
> > is nothing and SGI cannot explain it, just patch your OS and re-build mysqld
> > just to be sure -- this could be a bug in the thread library.
>
> Thank you.  This sent me in the right direction.  After quite a bit of
> searching, I found this was the case.
>
> In sql/mysqld.cc:
>
>    858    pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
>
> According to the man page for pthread_attr_setscope(3P):
>
>      Threads created with system scope have a direct effect on scheduling by
>      the kernel [see pthread_attr_setschedpolicy() and
>      pthread_attr_setschedparam()].  System scope threads are therefore
>      suitable for real-time applications [see realtime].  For example a system
>      scope thread may run at a higher priority than interrupt threads and
>      system daemons.  Creation of system scope threads requires the
>      CAP_SCHED_MGT capability [see capability].
>
> I looked through the capability(4) man page.  It's got stuff on a whole bunch of
> them,
> and refers to capabilities(4) man page, where we see:
>
>      CAP_SCHED_MGT
>           Privilege to issue restricted scheduler calls, such as the real time
>           scheduler interfaces.
>
> This is about the POSIX P1003.1e Capability features, which are available under IRIX
> 6.5.x
> (where I'm guessing that "x" is at least 3, since that's the place it first
> failed)..
>
> I use the username "mysql" to run the databases.  When I changed to root, it worked. 
> But,
> I don't want that.
>
> Under IRIX 6.5, you can set capabilities per process, where there's some code to
> work
> this magic out.  This part I haven't figured out.
>
> But, I did find a way.  You can set the capabilities on the file.  After
> installation, I did this:
>
>         # chcap "CAP_SCHED_MGT+epi" /opt/mysql/libexec/mysqld
>
> And, then it started fine under the user mysql.
>
> I'm not sure if this is the most correct way of doing so, since this
> capability stuff is new to me.  Anyone out there with experience with it
> on IRIX please correct me.  I'd suggest putting something into the
> autoconf to check for this.
>

Don:

You're doing the correct thing, as far as I know.   You might also check out the
/etc/capability file.

Chapter 4 of Irix Admin:  Backup, Security, and Accounting talks about capabilities as
well:
http://techpubs.sgi.com:80/library/dynaweb_bin/ebt-bin/0650/nph-infosrch.cgi/infosrchtpl/SGI_Admin/IA_BakSecAcc/@ebt-link;he=0?target=%25N%14_4592_START_RESTART_N%25

MySQL developers: would setting the scheduling scope to PTHREAD_SCOPE_PROCESS instead of
PTHREAD_SCOPE_SYSTEM make a difference?


Regards,

Dan Koch

Thread
mysql 3.22.30 problem on IRIX 6.5.5fdbadrak3 Feb
  • Re: mysql 3.22.30 problem on IRIX 6.5.5fsasha3 Feb
  • Re: mysql 3.22.30 problem on IRIX 6.5.5fsasha3 Feb
    • Re: mysql 3.22.30 problem on IRIX 6.5.5fDon Badrak4 Feb
      • Re: mysql 3.22.30 problem on IRIX 6.5.5fDaniel Koch4 Feb
      • Re: mysql 3.22.30 problem on IRIX 6.5.5fsasha4 Feb
      • Re: mysql 3.22.30 problem on IRIX 6.5.5fMichael Widenius9 Feb