Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Weird problem. Maybe kernel related.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Sun Jun 21, 2020 8:39 pm    Post subject: Weird problem. Maybe kernel related. Reply with quote

I think i screwed something up somehow. I probably did it a few days ago but just relized it now since i was gone for a while. So i don't know what exacly i did. I think besides a lot of other stuff i've also recompiled the kernel because i had the kernel config saved as kernelconf.config and it had to be just .config.

So here is the problem.
When i enter "dmesg" it tells me: "dmesg: read kernel buffer failed: Function not implemented"

When i try to compile something for example the firefox-bin and i do "emerge www-client/firefox-bin" after a while it gets stuck in an endless loop of the message: "madvise failed: Function not implemented"

Im sure there are many other cases where i would get an error with something like "Function not implemented" which i haven't noticed yet.

Feel free to move this post to another threat if its not kernel related.

Thanks for the help :D
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3916

PostPosted: Mon Jun 22, 2020 10:26 am    Post subject: Reply with quote

Hi
what happens when you run
Code:

grep CONFIG_ADVISE_SYSCALLS /usr/src/linux/.config

Apparently it should be set to "y"
:D
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Mon Jun 22, 2020 4:12 pm    Post subject: Reply with quote

alamahant wrote:
Hi
what happens when you run
Code:

grep CONFIG_ADVISE_SYSCALLS /usr/src/linux/.config

Apparently it should be set to "y"
:D


It is set to y.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Mon Jun 22, 2020 4:41 pm    Post subject: Reply with quote

What does ls -la /dev/kmsg return?

What does grep DMESG /usr/src/linux/.config return?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Mon Jun 22, 2020 4:50 pm    Post subject: Reply with quote

Anon-E-moose wrote:
What does ls -la /dev/kmsg return?

What does grep DMESG /usr/src/linux/.config return?


ls -la /dev/kmsg gives me: "crw-rw---- 1 root root 1, 11 22. Jun 18:10 /dev/kmsg"

grep DMESG /usr/src/linux/.config gives me: "# CONFIG_SECURITY_DMESG_RESTRICT is not set"
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Mon Jun 22, 2020 4:55 pm    Post subject: Reply with quote

I don't think that's the right permissions for kmsg

I show
Code:
crw-r--r-- 1 root root


A thought, what does
Code:
zgrep DMESG /proc/config.gz

return, as that's the running kernel's configuration.

Edit to add: what does cat /proc/sys/kernel/dmesg_restrict return
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Mon Jun 22, 2020 6:37 pm    Post subject: Reply with quote

Anon-E-moose wrote:
I don't think that's the right permissions for kmsg

I show
Code:
crw-r--r-- 1 root root


A thought, what does
Code:
zgrep DMESG /proc/config.gz

return, as that's the running kernel's configuration.

Edit to add: what does cat /proc/sys/kernel/dmesg_restrict return




zgrep DMESG /proc/config.gz: "gzip: /proc/config.gz: No such file or directory"

cat /proc/sys/kernel/dmesg_restrict: "cat: /proc/sys/kernel/dmesg_restrict: No such file or directory"

Hm weird...
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Mon Jun 22, 2020 6:42 pm    Post subject: Reply with quote

What does "uname -a" return?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Mon Jun 22, 2020 6:48 pm    Post subject: Reply with quote

Anon-E-moose wrote:
What does "uname -a" return?


It returns: "Linux GentooBox 5.4.38-gentoo #4 SMP Sun Jun 14 14:27:05 CEST 2020 x86_64 Intel(R) Core(TM) i5-6600k CPU @ 3.50GHz GenuineIntel GNU/Linux"
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Mon Jun 22, 2020 7:48 pm    Post subject: Reply with quote

You've gotten something misconfigured, not sure if it's in the kernel or something else happened.

You can set the permissions for kmsg (which should allow dmesg to work) or just dmesg as root, either will work.

As root "cdmod 644 /dev/kmsg" although the permissions will probably reset on reboot.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Mon Jun 22, 2020 11:04 pm    Post subject: Reply with quote

Anon-E-moose wrote:
You've gotten something misconfigured, not sure if it's in the kernel or something else happened.

You can set the permissions for kmsg (which should allow dmesg to work) or just dmesg as root, either will work.

As root "cdmod 644 /dev/kmsg" although the permissions will probably reset on reboot.



I tried this but i still get the same Errors like in my first message.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3417
Location: Canada

PostPosted: Tue Jun 23, 2020 4:08 am    Post subject: Reply with quote

Lynix48 wrote:
Anon-E-moose wrote:
I don't think that's the right permissions for kmsg

I show
Code:
crw-r--r-- 1 root root


A thought, what does
Code:
zgrep DMESG /proc/config.gz

return, as that's the running kernel's configuration.

Edit to add: what does cat /proc/sys/kernel/dmesg_restrict return




zgrep DMESG /proc/config.gz: "gzip: /proc/config.gz: No such file or directory"

cat /proc/sys/kernel/dmesg_restrict: "cat: /proc/sys/kernel/dmesg_restrict: No such file or directory"

Hm weird...



Well, it is not weird, it just means that

CONFIG_IKCONFIG_PROC ( that is to have /proc/config.gz )

is not set. Maybe even CONFIG_IKCONFIG itself is not set as well (to have .config information saved in the kernel itself)

BTW, do you have /proc support at all ?
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Tue Jun 23, 2020 11:54 am    Post subject: Reply with quote

dmpogo wrote:
Lynix48 wrote:
Anon-E-moose wrote:
I don't think that's the right permissions for kmsg

I show
Code:
crw-r--r-- 1 root root


A thought, what does
Code:
zgrep DMESG /proc/config.gz

return, as that's the running kernel's configuration.

Edit to add: what does cat /proc/sys/kernel/dmesg_restrict return




zgrep DMESG /proc/config.gz: "gzip: /proc/config.gz: No such file or directory"

cat /proc/sys/kernel/dmesg_restrict: "cat: /proc/sys/kernel/dmesg_restrict: No such file or directory"

Hm weird...



Well, it is not weird, it just means that

CONFIG_IKCONFIG_PROC ( that is to have /proc/config.gz )

is not set. Maybe even CONFIG_IKCONFIG itself is not set as well (to have .config information saved in the kernel itself)

BTW, do you have /proc support at all ?


Would that also explain the Error madvise failed: Function not implemented when compiling something?

How can i check if i have /proc support?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54577
Location: 56N 3W

PostPosted: Tue Jun 23, 2020 12:07 pm    Post subject: Reply with quote

Lynix48,

Code:
ls /proc
will show lots of things if you have /proc support.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Tue Jun 23, 2020 2:42 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Lynix48,

Code:
ls /proc
will show lots of things if you have /proc support.


ls /proc shows plenty of files and directories.
Back to top
View user's profile Send private message
Lynix48
n00b
n00b


Joined: 14 Jun 2020
Posts: 38

PostPosted: Tue Jun 23, 2020 2:47 pm    Post subject: Reply with quote

I just checked. CONFIG_IKCONFIG is not set. If i change it to yes will that just fix dmesg or will that also fix the compiling error?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3417
Location: Canada

PostPosted: Tue Jun 23, 2020 4:32 pm    Post subject: Reply with quote

Lynix48 wrote:
I just checked. CONFIG_IKCONFIG is not set. If i change it to yes will that just fix dmesg or will that also fix the compiling error?


This will just allow to query for compile options in the running kernel. Set also CONFIG_IKCONFIG_PROC, then you will have /proc/config.gz file for the running kernel.
I don't think it will resolve any compiling errors.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum