Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Hardened
pthread_create problems on hardened x86
 

Index | Next | Previous | View Flat


michael at orlitzky

Jul 31, 2012, 7:12 PM


Views: 480
Permalink
pthread_create problems on hardened x86

I've got an old problem with clamd, which creates a bunch of threads.
Every so often the logs will show e.g.,

Jul 31 06:01:41 mx1 clamd[24070]: pthread_create failed
Jul 31 06:01:41 mx1 clamd[24070]: pthread_create failed
Jul 31 06:01:41 mx1 clamd[24070]: pthread_create failed
Jul 31 06:01:41 mx1 clamd[24070]: pthread_create failed

It doesn't cause any noticeable problems, so I've sort of left it alone
but tonight I dug in a little. The problem seems (somehow) related to
that box's hardening.

I'm using a test program that creates a bunch of threads and then just
kills them. On the box in question,

# uname -a
Linux mx1 3.4.2-hardened #1 SMP Wed Jul 11 13:41:57 EDT 2012 i686
Intel(R) Xeon(TM) CPU 3.06GHz GenuineIntel GNU/Linux
# ./pthread_test 25
Creating 25 threads
Created thread #0...
Created thread #1...
Created thread #2...
Created thread #3...
pthread_create failed: Resource temporarily unavailable

Disabling all paxctl protections helps, but doesn't allow me to get all
the way to 25. I tried doing the protections one-at-a-time; it doesn't
really help:

# paxctl -pemrxs pthread_test
# ./pthread_test 25
Creating 25 threads
Created thread #0...
Created thread #1...
Created thread #2...
Created thread #3...
Created thread #4...
Created thread #5...
Created thread #6...
Created thread #7...
Created thread #8...
Created thread #9...
pthread_create failed: Resource temporarily unavailable

I get nothing in my dmesg, which otherwise records most limit-based denials.

Is there some way I can troubleshoot this? It works on amd64 with the
same kernel hardening options.

Subject User Time
pthread_create problems on hardened x86 michael at orlitzky Jul 31, 2012, 7:12 PM
    Re: pthread_create problems on hardened x86 pageexec at freemail Aug 1, 2012, 3:56 AM
        Re: pthread_create problems on hardened x86 michael at orlitzky Aug 1, 2012, 5:41 AM
            Re: pthread_create problems on hardened x86 pageexec at freemail Aug 1, 2012, 6:08 AM
                Re: pthread_create problems on hardened x86 michael at orlitzky Aug 1, 2012, 6:56 AM
                    Re: pthread_create problems on hardened x86 pageexec at freemail Aug 1, 2012, 2:29 PM
                        Re: pthread_create problems on hardened x86 michael at orlitzky Aug 1, 2012, 2:55 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.