frozen-bubble-1.0.0-r3 builds fine. Will only work for root, will not work for user. User is in games group. Error get when user starts game is: **************************************************************** ) = 655 stat64("/usr/share/games/frozen-bubble/gfx", {st_mode=S_IFDIR|0750, st_size=1312, ...}) = 0 getgroups32(32, []) = -1 EINVAL (Invalid argument) [*ERROR*] the datafiles seem to be missing! (could not read `/usr/share/games/frozen-bubble/gfx') The datafiles need to go to `/usr/share/games/frozen-bubble'. ) = 170 getpid() = 4243 getpid() = 4243 getpid() = 4243 munmap(0x40fc9000, 671744) = 0 munmap(0x40e7c000, 1024) = 0 exit_group(22) = ? ***************************************************************** If look in /usr/games/bin some are set user = root. But can run them as user, except for frozen-bubble -rwxr-x--- 1 root games 59044 Aug 29 06:42 fbg -rwxr-x--- 1 root games 83582 Sep 29 09:04 frozen-bubble -rwxr-x--- 1 root games 91075 Sep 29 09:04 frozen-bubble-client -rwxr-x--- 1 root games 2179 Sep 29 09:04 frozen-bubble-editor -rwxr-x--- 1 root games 15615 Sep 29 09:04 frozen-bubble-server -rwxr-x--- 1 games games 171744 Feb 3 2004 gnuchess -rwxr-x--- 1 games games 361 Feb 3 2004 gnuchessx -rwxr-x--- 1 root games 94268 Aug 28 19:33 ltris -rwxr-x--- 1 root games 829904 Jun 22 23:08 mahjongg3d Have tried fbg, ltris, mahjongg3d and will work for user. If look in /usr/share/games all files and folders are set user/group: root/games Most files in there are set perms 640, few are 660, folders are 750 (gfx folder is also 750.) Comparing to other games in there, permissions are almost identical, but only root can run frozen-bubble. Found if chmod 755 on all /usr/share/games/frozen-bubble files/folders can play the game as user. Tried to isolate it down further, by just going into the folders and nogo. Have to pretty much 'chmod -R 755 /usr/share/games/frozen-bubble' for it to work for user. Reproducible: Always Steps to Reproduce: 1. Frozen-bubble was already install, something happened. 2. emerge -C frozen-bubble and remerged and same error. 3. Can only run as user if 'chmod -R 755 /usr/share/games/frozen-bubble' Actual Results: If don't chmod on folder. It will get error: [*ERROR*] the datafiles seem to be missing! (could not read `/usr/share/games/frozen-bubble/gfx') The datafiles need to go to `/usr/share/games/frozen-bubble'. Expected Results: frozen-bubble to run for user that is in games folder. All other games work for users. Portage 2.0.50-r11 (default-x86-1.4, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8-gentoo-r3) ================================================================= System uname: 2.6.8-gentoo-r3 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.5.3 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /lib/modules /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="3dnow X aalib alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups dvd encode esd flash foomaticdb gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile imlib java jpeg kde libg++ libwww mad mikmod mmx motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline scanner sdl slang spell sse ssl svga tcpd tetex tiff truetype vi x86 xml2 xmms xprint xv zlib"
What's the output of the command "gropus"
or even the command "groups"
forgot to mark this...reopen with the info. Thanks.
I think I said that 'user is in the games group'. Why was this marked "resolved needinfo'?? The info was given in the post, in the second line: User is in games group. Output of entire group for user is totally useless in this case, but here it is for your viewing: bin daemon sys adm tty disk lp mem kmem wheel floppy mail uucp man cron console audio cdrom ftp sshd at tape video gdm xfs games mysql postgres cdrw apache usb users cdrecording foldingathome portage slocate speech clamav scanner
Also, this isn't the only system have seen this on, have found it on two systems so far.
From a terminal, do this: ( groups ; stat /usr/share/games/frozen-bubble/gfx ; strings /usr/share/games/frozen-bubble/gfx/banane.png ; frozen-bubble ) &> /tmp/output attach the output in /tmp/output as a text/plain please.
are you telling me your one user is in all of these groups ? bin daemon sys adm tty disk lp mem kmem wheel floppy mail uucp man cron console audio cdrom ftp sshd at tape video gdm xfs games mysql postgres cdrw apache usb users cdrecording foldingathome portage slocate speech clamav scanner that's screwed up
Created attachment 40830 [details] This is from default install, where game doesn't work.
Created attachment 40831 [details] This is with permissions 755 and game works.
I'm the only user on the system. Haven't seen a clear explaination of what groups a system like mine should have vs shouldn't. Plus some don't even work correctly anyway, like for example 'portage', never have been able to just: emerge -s appname . Know that can't emerge with it as user, but can't do anything with it at all. Another is 'foldingathome' still can only check it as root. Sure some of it is overkill, but if you could point me to a doc that explains fully what should and should have, then will take a look. Anyway, sorry Mr. Bones. You probably didn't see my original post where said was in 'games' group or wanted more info and reacted incorrectly. Again, sorry. Here is the result of what you wanted from the command above Spanky. I already chmod to 755 on it so ran it first to see and game started. Just to clean it up, did an emerge -C frozen-bubble and remerged it to run the command again. Game didn't start, but results almost identical. permissions 755 --> file attached is: output_works.txt permissions 750 (default emerge) --> file attached is: output_fails.txt Again, Spanky if you could point me somewhere that would explain the groups fully would appreciate it. Or maybe I should start experimenting. Hopefully, the attachment leads somewhere. Let me know if need more info. Installed my Dad's system and frozen-bubble works on there, but on this and another system it doesn't.
It's clear that there are is some odd permission issue on your systems. What's the output of these commands: 1. perl -e 'print "$< $>\n"' 2. ls -Ll `which perl` 3. which frozen-bubble Also, please do emerge -evp frozen-bubble &> /tmp/output and attach /tmp/output as text/plain.
Weird permissions on system?! Figured as much, thought it might be something I did, but on the other system game doesn't work on I didn't install system. So surely has to happen to others also. Thought it might be my /etc/profile umask cause it caused a problem with kde *.desktops, 'my' default is 077, but tried gentoo default of 022 and still wouldn't work. But it still might have done something somewhere else. Here are the results: bash-2.05b$ perl -e 'print "$< $>\n"' 1001 1001 bash-2.05b$ ls -Ll `which perl` -rwxr-xr-x 1 root root 991500 Sep 27 18:31 /usr/bin/perl bash-2.05b$ which frozen-bubble /usr/games/bin/frozen-bubble
Created attachment 40854 [details] results from 'emerge -evp frozen-bubble &> /tmp/output'
in the 'emerge -evp frozen-bubble &> /tmp/output' the portage part is weird. If reading it correct it wants to update and says New to a portage already installed. Part of result from above: [ebuild N ] sys-apps/portage-2.0.50-r11 -build -debug -(selinux) 0 kB *** Please update portage to the above version before proceeding. Failure to do so may result in failed or improper merges. A simple 'emerge -u portage' is sufficient. But already have it and emerge -p portage will just be a rebuild: bash-2.05b# emerge -s portage * sys-apps/portage Latest version available: 2.0.50-r11 Latest version installed: 2.0.50-r11
Found something weird on this. Tried all the frozen-bubble progs in /usr/games/bin . Can run this one /usr/games/bin/frozen-bubble-editor as user. Well frozen-bubble -server works also, but don't think it counts.
Got some more weird information on problem. Not what is causing it, but can make the game run with no problems so far if comment out offending line in code. Haven't found a problem with running it yet if do so. Ran the perl debugger: ********************************** snip DB<1> s main::(/usr/games/bin/frozen-bubble:2239): 2239: init_game(); DB<1> s main::init_game(/usr/games/bin/frozen-bubble:1281): 1281: foreach qw(gfx snd data); DB<1> T . = main::init_game() called from file `/usr/games/bin/frozen-bubble' line 2239 DB<1> s main::init_game(/usr/games/bin/frozen-bubble:1281): 1281: foreach qw(gfx snd data); DB<1> T . = main::init_game() called from file `/usr/games/bin/frozen-bubble' line 2239 DB<1> s [*ERROR*] the datafiles seem to be missing! (could not read `/usr/share/games/frozen-bubble/gfx') The datafiles need to go to `/usr/share/games/frozen-bubble'. main::init_game() called at /usr/games/bin/frozen-bubble line 2239 main::CODE(0x8696a84)(/usr/games/bin/frozen-bubble:149): 149: if ($app) { DB<1> T $ = main::END() called from file `/usr/games/bin/frozen-bubble' line 1281 $ = eval {...} called from file `/usr/games/bin/frozen-bubble' line 1281 DB<1> p $FPATH/$_ Illegal division by zero at (eval 15)[/usr/lib/perl5/5.8.4/perl5db.pl:619] line 2. ************************************* Was going to see what output from debugger would happen if commented out the die line above in /usr/games/bin/frozen-bubble 1281. So commented it out completely: ************************************* sub init_game() { # -r "$FPATH/$_" or die "[*ERROR*] the datafiles seem to be missing! (could not read`$FPATH/$_')\n". # " The datafiles need to go to `$FPATH'.\n" # foreach qw(gfx snd data); print '[SDL Init] ' ************************************ Started the debugger again and game ran for user. Quit debugger and game ran, played a level and quit, saved hiscore and everything appears normal. Problem might be in /usr/lib/perl5/5.8.4/perl5db.pl:619 Then again, this might just be from using the debugger, but the stack backtrace gave me this output when failed. Not knowing perl very well, probably as far as can go from here. ************************************snip ############################################## Begin lexical danger zone # 'my' variables used here could leak into (that is, be visible in) # the context that the code being evaluated is executing in. This means that # the code could modify the debugger's variables. # # Fiddling with the debugger's context could be Bad. We insulate things as # much as we can. sub eval { # 'my' would make it visible from user code # but so does local! --tchrist # Remember: this localizes @DB::res, not @main::res. local @res; { # Try to keep the user code from messing with us. Save these so that # even if the eval'ed code changes them, we can put them back again. # Needed because the user could refer directly to the debugger's # package globals (and any 'my' variables in this containing scope) # inside the eval(), and we want to try to stay safe. local $otrace = $trace; local $osingle = $single; local $od = $^D; # Untaint the incoming eval() argument. { ($evalarg) = $evalarg =~ /(.*)/s; } # $usercontext built in DB::DB near the comment # "set up the context for DB::eval ..." # Evaluate and save any results. @res = eval "$usercontext $evalarg;\n"; # '\n' for nice recursive debug # Restore those old values. $trace = $otrace; $single = $osingle; $^D = $od; } *******************************************
Found the problem isn't the game. Looks like it might be perl. Did some test and if user is in more than 32 groups (old ngroups_max was 32, as of at least kernel 2.6.4 it has been changed to 65k) than perl will report that the user is just in 'users' group only. Before you say something Spanky, they must have changed it for a reason, so apparently there is a need. If change to <=32 groups then reports correctly. Anyway, groups command still reports all the groups user in and so does posix. From test have ran it appear to be perl still has it set to 32 max and isn't honoring the ngroups_max = 65k. So when the game checks if files are readable they are not readable to the user cause it sees them as only in the 'users' group and not 'games'. So this bug is closed cause it isn't about the game anymore. Going to do some more research, then might open a new bug if think might be warranted. Was going to close the bug myself, but not sure if want it fixed or better: invalid.
Interesting. Since it's not a bug with frozen-bubble I'll go ahead and close as invalid.