[Lxc-users] Problem with pthread_create SCHED_RR - Operation not permitted

Serge Hallyn serge.hallyn at canonical.com
Mon Jul 2 17:08:05 UTC 2012


This appears to be a cgroup issue (presumably by design).  Without involving
lxc, just do

sudo bash
# mkdir /sys/fs/cgroup/cpu/1
# echo $$ > /sys/fs/cgroup/cpu/1/tasks
# (run your test)
pthread_create failed - Operation not permitted

-serge

Quoting Serge Hallyn (serge.hallyn at canonical.com):
> Quoting Hans Feldt (Hans.Feldt at ericsson.com):
> > Hi,
> > 
> > As the subject says, pthread_create for SCHED_RR fails with EPERM(1) in my 
> > container. Program run as root.
> > 
> > Same program run directly on host works. I tried disabling the apparmor stuff 
> > but no luck.
> > 
> > host: ubuntu 12.04
> > container: generated with the "ubuntu" template
> > 
> > Any ideas?
> 
> Hm, everything I see in the kernel source suggests that CAP_SYS_NICE should
> suffice.  (I assume you didn't add that to lxc.cap_drop)  But I don't have
> a solid grasp of the the autogroup code under kernel/sched.
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list