Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: scheduling while atomic #1

Open
mansman12 opened this issue Nov 10, 2023 · 10 comments
Open

BUG: scheduling while atomic #1

mansman12 opened this issue Nov 10, 2023 · 10 comments

Comments

@mansman12
Copy link

Build and install works fine on debian 12 however during boot and shutdown the terminal is spammed with messages saying 'BUG: scheduling while atomic'.

Looks to be a previous issue that was resolved in an earlier fork (here) but cropped up again in on later kernel updates. That fix looked to be using GFP_ATOMIC with kzalloc in debug.c rather than GFP_KERNEL with kmalloc (here).

Bug is present in kernel version 6.1.0-13, 6.5.0-0 (ones I've tried). Also prevents 6.5.0-0 from shutting down properly.

Bug also stops using any debug modes as the terminal is spammed.

@tyisafk
Copy link

tyisafk commented Nov 23, 2023

Having the same issue as well. Tried on Arch Linux's latest and LTS kernels.

@mansman12
Copy link
Author

I've traced the issue down further to the workqueue using sudo dmesg after a reboot. It looks like the issue is tied to sys_work_func from aver_xilinx_I2CRead:

[ 37.990515] aver_xilinx_I2CRead+0x122/0x1e0 [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]
[ 37.990537] i2c_model_read+0x65/0x90 [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]
[ 37.990556] i2c_read_byte+0x4e/0x55 [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]
[ 37.990571] ? srso_return_thunk+0x5/0x10
[ 37.990573] iTE_I2C_ReadByte+0x45/0x5f [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]
[ 37.990588] hdmi2_irq+0x2a/0x9e [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]
[ 37.990602] ite6664_task+0x9f/0xec [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]
[ 37.990616] sys_work_func+0x38/0xc0 [gc573 adad1fd057fa98bc83d93c882a9756e51178a26f]

I've looked at various files in the utils folder and found a bunch of them are still using GFP_KERNEL rather than GFP_ATOMIC but can't find which ones actually need updating without doing a ton of trial and error. The files in question are the following:

  • utils\i2c\i2c_model.c
  • utils\mem\mem_c_model.c
  • utils\misc\sys.c
  • utils\trace\debug.c
  • utils\v4l2\framegrabber.c
  • utils\v4l2\v4l2_model_device.c
  • utils\v4l2\v4l2_model_videobuf2.c

I've tried building and installing changing all the GFP_KERNEL in utils\i2c\i2c_model.c followed by only changing all the GFP_KERNEL in utils\misc\sys.c with no luck.

@mansman12
Copy link
Author

Having looked at previous issues on the original fork, it looks like it just might be down to a bug on how Linux currently handles interrupt contexts.

The guy in this issue hired a developer and they gave feedback in the last comment: derrod#18

@zDEFz
Copy link

zDEFz commented Mar 11, 2024

Today I have installed the kernel module and set it up.
I appear to crash a lot.

See: https://0x0.st/HhJN.txt
I will boot Windows and update the firmware.

If this will fix my issue, it could be that the latest firmware is a requirement.

Unclear.

Edit there was no firmware update available. I will investigate the cause of the crash.

Not crashed so far, but also not opened OBS

Well, it works, but seems awfully laggy.

@NulliferBones
Copy link
Owner

Unfortunately I do not know how to fix this problem. I wish someone else could help.

@mansman12
Copy link
Author

Unfortunately I do not know how to fix this problem. I wish someone else could help.

Yup, I moved on to a different capture card as it doesn't seem like this will be resolved any time soon.

@zDEFz
Copy link

zDEFz commented Jul 17, 2024

Unfortunately I do not know how to fix this problem. I wish someone else could help.

Yup, I moved on to a different capture card as it doesn't seem like this will be resolved any time soon.

Same. Got a used Magewell card with 2 DVI and adapted that to 2x HDMI

@NulliferBones
Copy link
Owner

I love this capture card, it's so nice. But now I also wish I could afford a different one.

@mansman12
Copy link
Author

I love this capture card, it's so nice. But now I also wish I could afford a different one.

The one I moved on to was this one: https://www.youtube.com/watch?v=RpLASLDXxiM

I think it was about $200 last time I checked.

Word of warning, if you don't have a video signal coming through it your OBS log gets spammed with events.

That bug in the drivers hasn't been fixed.

@zDEFz
Copy link

zDEFz commented Jul 17, 2024

I love this capture card, it's so nice. But now I also wish I could afford a different one.

The one I moved on to was this one: https://www.youtube.com/watch?v=RpLASLDXxiM

I think it was about $200 last time I checked.

Word of warning, if you don't have a video signal coming through it your OBS log gets spammed with events.

That bug in the drivers hasn't been fixed.

I bought my magewell 11070 dual dvi used.. for £113,88 at blackmoreit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants