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

Infinite loop in isTextInFile #44

Open
jfschaefer opened this issue Sep 17, 2024 · 4 comments
Open

Infinite loop in isTextInFile #44

jfschaefer opened this issue Sep 17, 2024 · 4 comments

Comments

@jfschaefer
Copy link

jfschaefer commented Sep 17, 2024

perl -w /usr/bin/tuxedo-tomte configure all ran for me with 100% CPU usage.

I've been digging a bit into the code and the problem seems to be the while loop in isTextInFile.

Specifically, adding a line for logging:

		while( $FH ) {
			printLog("FILE $filename MATCH /$match/", 'TL0', '[WARN]');
			if ( $_ =~ /$match/sm) {
				return (1);
			}
		}

I get the following output:

FILE /etc/modprobe.d/tuxedo_early_load_backlight_control_fix.conf MATCH /softdep nvidia pre: i915/
FILE /etc/modprobe.d/tuxedo_early_load_backlight_control_fix.conf MATCH /softdep nvidia pre: i915/
FILE /etc/modprobe.d/tuxedo_early_load_backlight_control_fix.conf MATCH /softdep nvidia pre: i915/
FILE /etc/modprobe.d/tuxedo_early_load_backlight_control_fix.conf MATCH /softdep nvidia pre: i915/

etc.

/etc/modprobe.d/tuxedo_early_load_backlight_control_fix.conf contains a single line:

softdep nvidia pre: i915

I feel like this should be an easy fix, but I don't know any perl, unfortunately.

@jfschaefer
Copy link
Author

Okay, #43 seems to fix it

@Emohr-Tuxedo
Copy link
Contributor

THX, I will correct it and upload it today

@Emohr-Tuxedo
Copy link
Contributor

The hotfix is online. Please update Tomte and you might want to delete the logfile:

sudo rm /var/log/tomte/tomte.log

THX again for letting me know

@jfschaefer
Copy link
Author

Great, the new version works.
And thanks for mentioning that the log file should be removed (it was 23GB).

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

2 participants