# strange dmesg

## fourhead

im using gentoo-dev-sources-2.6.3-r1 and ati-drivers 3.2.8-r1 and i get the following in dmesg all the time:

Debug: sleeping function called from invalid context at include/asm/semaphore.h:119

in_atomic():1, irqs_disabled():0

Call Trace:

 [<c01187fb>] __might_sleep+0xab/0xd0

 [<e19abdba>] __ke_down_struct_sem+0x2a/0x50 [fglrx]

 [<e19bbd94>] drm_getmagic+0x124/0x1c0 [fglrx]

 [<e19bbc70>] drm_getmagic+0x0/0x1c0 [fglrx]

 [<e19aeacd>] firegl_ioctl+0x15d/0x1e0 [fglrx]

 [<c0161383>] sys_ioctl+0x113/0x2d0

 [<c0108fdb>] syscall_call+0x7/0xb

does anyone have an idea? i can't tell how long i have this problem, didn't look into the logfiles for a long time (shame on me)

tom

----------

## forceflow2

I have had this problem (slightly different output) for quite some time also, using the same things as you except I have kept up with kernel versions and am currently using the latest 2.6.5

Debug: sleeping function called from invalid context at include/asm/semaphore.h:119

in_atomic():1, irqs_disabled():0

Call Trace:

 [<c0118106>] __might_sleep+0xab/0xc9

 [<e0ceda82>] __ke_down_struct_sem+0x2a/0x44 [fglrx]

 [<e0cfb4b3>] drm_find_file+0x23/0x70 [fglrx]

 [<e0cfb7df>] drm_getmagic+0xff/0x160 [fglrx]

 [<e0cfb6e0>] drm_getmagic+0x0/0x160 [fglrx]

 [<e0cef9a6>] firegl_ioctl+0x146/0x1b0 [fglrx]

 [<c0160704>] sys_ioctl+0xfd/0x285

 [<c010727f>] syscall_call+0x7/0xb

----------

## Rainmaker

what kernel version are you using?

----------

## forceflow2

 *forceflow2 wrote:*   

> ...using the same things as you except I have kept up with kernel versions and am currently using the latest 2.6.5
> 
> 

 

Or did you mean elektrohirn? Because we both mentioned it in the posts. (he is using gentoo-dev-sources-2.6.3-r1 )

----------

## pandaxiongmao

I have the identical problem as you are  :Sad: 

```

Debug: sleeping function called from invalid context at include/asm/semaphore.h:

119

in_atomic():1, irqs_disabled():0

Call Trace:

 [<c0118106>] __might_sleep+0xab/0xc9

 [<e092fa87>] __ke_down_struct_sem+0x2a/0x44 [fglrx]

 [<e093f6c4>] drm_getmagic+0x124/0x1c0 [fglrx]

 [<e093f5a0>] drm_getmagic+0x0/0x1c0 [fglrx]

 [<e09323fd>] firegl_ioctl+0x15d/0x1e0 [fglrx]

 [<c0160993>] sys_ioctl+0xfd/0x282

 [<c010727f>] syscall_call+0x7/0xb

```

I'm running 2.6.5-gentoo

Any helpful advice?

----------

## dtor

These are debug messages. They say that DRM subsystem does something slightly wrong - it calls a function that may sleep, but does so in atomic context. It can cause deadlocks.

Oh, wait, fglrx... Is it binary only module from ATI? Ignore, nothing can do, move along...

----------

## pandaxiongmao

Thanks for the explanation, I guess I worried about dmesg messages too much.

 :Smile: 

----------

## mrgamer

i had this debug message since 2.6.0-test9 kernels (the first kernel i never used  :Very Happy: )

it's a dumb problem of ati programmers... for get it down you have to disable preemptive kernel  :Razz: 

it's the only way i know for let him go.. so i don't use the preempt in 2.6.x :°°°

i done also some posts with this trouble.. but they are never be read in all this time...

i'm now using 3.7.6-r1, nothing changes.. if someone has solutions, post here please   :Wink:   :Surprised: 

----------

## pandaxiongmao

If I disable the preemptive option from the kernel, will it affect my computer performance?

BTW, thanks for the solution, mrgamer. Has anyone had any other solution?

----------

## pandaxiongmao

Update

I got another alternative solution, I hope this can really fix the problem.

It seems that you could also disable SPINLOCK under "Kernel Hacking" section, instead of PREEMPT, and the problem disappears.

BTW, is it safe to disable SPINLOCK? I guess if SPINLOCK option is unecessary, I will have it disabled forever in favor of PREEMPT, which I think will help my desktop performance.

----------

