Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
strange boot message about rc-cgroup.sh
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 212
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Mon Jun 29, 2015 10:25 pm    Post subject: strange boot message about rc-cgroup.sh Reply with quote

Hi,

last week I got my old graphics card, a Nvidia GeForce210, replaced by a GeForce GTX 750 and emerged the latest nvidia-drivers. Since then I noticed a line at boot time saying:

Code:

/lib64/rc/sh/rc-cgroup.sh: Zeile 89: printf: Schreibfehler: Kein passendes Gerät gefunden.


Which I think might be in english:
Code:

/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No matching device found.


I don't know if this line was there before the replacement of the graphics card...

OK, I understand that it might be something related with rc-cgroups - but I don't even know why it appears since I never had something to do with rc-cgroups. Or do I but didn't know it? :wink:

Is there a way to get rid of this line and the problem it is pointing at?


Thanks a lot for your help!
Andy


EDIT: typo in subject corrected
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2289
Location: near Augsburg, Germany

PostPosted: Fri Jul 03, 2015 6:56 pm    Post subject: Reply with quote

Then analyze the rc-cgroup.sh.
Back to top
View user's profile Send private message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 212
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Fri Jul 03, 2015 7:58 pm    Post subject: Reply with quote

Hey Arminius :wink:

Thanks a lot for your response!

Unfortunately, I do not know anything about cgroups... What I found on the gentoo-wiki was as helpful as the article on wikipedia - now I know that it exists but I don't understand for what I would need it (and why it is enabled in the kernel since an upgrade to 4.0.5). And I don't know why it only gives errors on the machine with the changed graphics card...

Today I re-compiled the kernel (without altering the .config) and now the original line is gone but this came up instead:
Code:

/lib64/rc/sh/rc-cgroup.sh: Zeile 89: /sys/fs/cgroup/openrc/keymaps/tasks: Datei oder Verzeichnis nicht gefunden


Which I would translate into:
Code:

/lib64/rc/sh/rc-cgroup.sh: line 89: /sys/fs/cgroup/openrc/keymaps/tasks: file or directory not found



OK, this parts of /lib64/rc/sh/rc-cgroup.sh:
Code:

(...)
cgroup_add_service()
{
    # relocate starting process to the top of the cgroup
    # it prevents from unwanted inheriting of the user
    # cgroups. But may lead to a problems where that inheriting
    # is needed.
        for d in /sys/fs/cgroup/* ; do
                [ -f "${d}"/tasks ] && printf "%d" 0 > "${d}"/tasks
        done

        openrc_cgroup=/sys/fs/cgroup/openrc
        if [ -d "$openrc_cgroup" ]; then
                cgroup="$openrc_cgroup/$RC_SVCNAME"
                mkdir -p "$cgroup"
                [ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks"
        fi
}
(...)


with line 89 being:
Code:

[ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks"



Now I'm really sorry but I don't know what to do next :(
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Jul 04, 2015 7:54 pm    Post subject: Reply with quote

Lebkoungcity wrote:
Code:
[ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks"

Ugh that's ugly. Apparently there was a bug in the kernel, but the documentation on cgroups, makes it clear that a newline is required. cf: less /usr/src/linux/Documentation/cgroups/cgroups.txt

Odd; ime Hubbs has always refused to "work around" bugs, or indeed add any portability mechanisms, on the grounds that whatever is at fault should correct its bug (even where there isn't one, which is helpful.)

File a bug. At least let's get a reference as to what bug in the kernel they're supposedly "working-round," though I imagine it'll just get reverted, likely in a way that doesn't look like a reversion.

Shame, he could have patched it to be more robust; certainly that was the intent when qnikst and I wrote it (that we'd come back and add robustness based on user feedback, but in the meantime we'd leave errors visible to get that feedback as to what mattered and what could be ignored.) In this case, I'd use an 'if', which was what I originally wanted to do.

OFC this could just be a race, but I don't think so; it's a shame the tests were modded to be less efficient as well.
No accounting for people.
Back to top
View user's profile Send private message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 212
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Sun Jul 05, 2015 11:42 am    Post subject: Reply with quote

Hi steveL,

thanks for reading and answering my post!

I filed a bug:
https://bugs.gentoo.org/show_bug.cgi?id=553978

Hope I did it the right way!

Greetings,
Andy
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Jul 05, 2015 7:38 pm    Post subject: Reply with quote

Yeah that's fine Andy, thanks.

If you want to make it quicker, you can tell them this is related to https://github.com/OpenRC/openrc/issues/33 or "issue 33 upstream" (though it's an in-house project) as the commit which introduced the changes, is in relation to that.

You can put the URL in the bug's URL field if you want.
Back to top
View user's profile Send private message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 212
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Sun Jul 05, 2015 8:01 pm    Post subject: Reply with quote

OK, added it. Thanks for the advice!

Now, let's see what'll happen next :wink:
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
NTU
Apprentice
Apprentice


Joined: 17 Jul 2015
Posts: 187

PostPosted: Fri Jul 17, 2015 7:22 pm    Post subject: Reply with quote

I'm not sure how common this bug is but I have it too. I commented in the bug report with more information.

grep "printf" /var/log/rc.log:

loopback |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device
loopback |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device
termencoding |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device
termencoding |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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