Summary: | vmware-config.pl fails with kernel 2.6.16 and 2G/2G | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sven <sven.koehler> |
Component: | New packages | Assignee: | Gentoo VMWare Bug Squashers [disabled] <vmware+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 61.terrace-swan, alonbl, askwar, bug, cnoss, gentoo.2019, gentoobugzilla, m.debruijne, net1957, patrizio.bassi, peter, philantrop, r055co, spamtrap+gentoo, svec, svejk, sven.koehler, znmeb |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 126972 | ||
Attachments: |
patch for vmware-config.pl to accept the new linux 2.6.16 syntax (added 'unsigned long' as a keyword)
patch for vmware-config.pl to accept the new linux 2.6.16 syntax (added 'unsigned long' as a keyword) vmware-config.pl.diff patch for vmware-config.pl |
Description
Sven
2006-03-20 16:48:05 UTC
Thank you, for the link! *** Bug 127164 has been marked as a duplicate of this bug. *** Any status update on this? Created attachment 83048 [details, diff]
patch for vmware-config.pl to accept the new linux 2.6.16 syntax (added 'unsigned long' as a keyword)
To resolve all the issues with vmware-workstation and linux 2.6.16, it is also needed to bump the any-updates to #99 (havn't tested that, but when I added the missing row in Makefile.kernel I got it running, and the update has that row, so I guess it will work).
Created attachment 83049 [details, diff]
patch for vmware-config.pl to accept the new linux 2.6.16 syntax (added 'unsigned long' as a keyword)
To resolve all the issues with vmware-workstation and linux 2.6.16, it is also needed to bump the any-updates to #99 (havn't tested that, but when I added the missing row in Makefile.kernel I got it running, and the update has that row, so I guess it will work).
Oops, sorry. There should be only one patch. I think my connection is a litle bit unstable :-/ Hopefully, I will be able to get to this in the next day or so. I can confirm that the patch and any-any-update99 works on gentoo-sources-2.6.16-r1. For those that come straight here and don't see the forum post, the link to the any-any-update99 patch is: http://ftp.cvut.cz/vmware/vmware-any-any-update99.tar.gz Fixed in CVS. Thanks for the bug report and the patch! *** Bug 128223 has been marked as a duplicate of this bug. *** Hello, The vmware-config.pl is not working for me... Please update to the following: --- vmware-config.pl 2006-03-31 16:19:37.000000000 +0300 +++ vmware-config.pl.new 2006-03-31 16:17:47.000000000 +0300 @@ -1969,7 +1969,7 @@ sub check_answer_headerdir { . ' -E - | ' . shell_string($gHelper{'grep'}) . ' ' . shell_string($pattern)); chomp($header_page_offset); - $header_page_offset =~ s/^$pattern \(?0x([0-9a-fA-F]{8,}).*$/$1/; + $header_page_offset =~ s/^$pattern \(.*0x([0-9a-fA-F]{8,}).*$/$1/; if ($header_page_offset =~ /[0-9a-fA-F]{8,}/) { # We found a valid page offset if (defined($gSystem{'page_offset'}) and (In reply to comment #12) > The vmware-config.pl is not working for me... > Please update to the following: Hi, thanks. That helped my compiling vmware kernel modules again. Portage 2.1_pre7-r3 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-r1 i686) ================================================================= System uname: 2.6.16-gentoo-r1 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.12.0_pre16 ccache version 2.4 [enabled] dev-lang/python: 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -fforce-addr -fomit-frame-pointer -ftracer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -fforce-addr -fomit-frame-pointer -ftracer -pipe -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo http://gentoo.inode.at http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.osuosl.org/ http://ftp.easynet.nl/mirror/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X aac acpi alsa arts asf automount avi berkdb bitmap-fonts bzip2 cairo cddb cdparanoia chroot cjk cli crypt css ctype cups dba divx4linux dri dvd dvdr dvdread eds emboss encode expat faac fastbuild ffmpeg firefox flac foomaticdb force-cgi-redirect foreign-package fortran freetype ftp gd gdbm gif glitz gmp gnokii gpm graphviz gs gtk gtk2 hal howl idn ieee1394 imagemagick imap imlib isdnlog jack jbig joystick jpeg jpeg2k kde kdeenablefinal lame lcms libg++ libsamplerate libwww lzo lzw-tiff mad matroska mbox memlimit mhash mikmod mmx mng mozilla mp3 mpeg mpeg4 mplayer musepack musicbrainz ncurses nls nptl nsplugin numeric ogg ooo-kde openexr opengl oss pam pcre pdflib perl pic png posix ppds pppd python qt quicktime readline real rtc samba session simplexml slp sms sndfile soap sockets spell spl sse ssl svg tcpd theora tiff tokenizer transcode truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd visualization vorbis win32codecs wmf xine xinerama xml xml2 xmms xprint xsl xv xvid xvmc zlib zvbi elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de userland_GNU video_cards_nv video_cards_nvidia video_cards_vesa" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS xactly what version/revision are you still having issues with? I tested both 4.5 and 5.5 (latest revisions) and had 0 problems. I use app-emulation/vmware-workstation-5.5.1.19175-r2 (latest) There is a problem with the regular expression, there is more than just a '(?0x', the ? can be (unsigned long). *** Bug 128260 has been marked as a duplicate of this bug. *** HAHAHAHAHHAA... I forgot to add the stupid patch to the ebuild in CVS. Anyway, this should be fixed. I didn't revision bump the ebuild, so emerge --sync and make sure it is pulling in config3.patch before trying again. Bad news: it doesn't work for me. I inserted a print "$gSystem{'page_offset'} $header_page_offset\n"; into the script right before the if that compares those two values - remember: those values have to be equal. And the output of the print is: 40000000 78000000 So the values don't match, but that really shouldn't be the case. Can you tell me, from where vmware-config.pl gets those two values? I want double check that vmware-config.pl is still wrong. More information: the printed 78000000 is correct - it's the page offset extracted from the header files. The problem is the value in $gSystem{'page_offset'}. As far as i can see, vmware-config.pl tries to detect it using /proc/kallsyms. (lines 2588ff) And yes, all the numbers are above 78000000. Then i looked at the detection: $first = lc(substr($fields[0], 0, 1)); if ($first =~ /^[4567]$/) { $first = '40000000'; } [...] $gSystem{'page_offset'} = $first; $first seems to contain the first digit of the page-offsets extracted from /proc/kallsyms - and yes, the case above matches, but it's completely wrong because it results in "40000000"! I guess, that vmware-config.pl does not include any support for the 2G/2G-split of the 2.6.16 kernel, because the split seems to have moved from 0x80000000 to 0x78000000 - and that's yet another problem! BTW: who wrote that perl-code? why do they call "grep" instead of doing the regexps in perl? doesn't matter ... I suggest rewriting the code in the following way: open /proc/ksyms or /proc/kallsyms and look for the lowest offset != 0. Apply the mask 0xFF000000, and we've got the pageoffset. If it's below 0x40000000, then drop it (which is equivalent to the current method) I have no clue, whether this is very portable and reliable, but the current code is completely unusable since it only detects a very limited set of pageoffsets (not including the new pageoffsets since kernel 2.6.16). Created attachment 83618 [details, diff]
vmware-config.pl.diff
Very crude patch to try to make it work
patch works for me Clemens, your patch seems to work as far as i can tell - but there are two problems: - which splits do exist out there in real life? We need to make sure, that all common splits are recognized, and the list might not be complete yet. - the original routine in vmware-config.pl is very pessimistic about the position of "printk" being near the page-offset, and i cannot tell, how deterministic those offsets are or if my "apply bitmask 0xFF000000"-method would ever work. Honestly, guys, this really should be taken up with vmware themselves as vmware-config.pl is totally their code and I'd prefer us not patch it unless we're also making sure it gets upstream, too. (In reply to comment #23) > Honestly, guys, this really should be taken up with vmware themselves as > vmware-config.pl is totally their code and I'd prefer us not patch it unless > we're also making sure it gets upstream, too. > Agreed ... is anyone here running a "brand" of Linux officially supported by VMWare that uses this kernel and has a paid VMWare license? This would probably get a lot more attention from a paying customer than from a Gentoo user. :) I have a VMTN license but neither an official RHEL nor SuSE paid license. So ... I'm halfway there. :) RHEL is still 2.6.9 IIRC, but I don't know about SuSE. Christ, you're right. But i don't think, that vmware will provide a fix as fast as we wish :-) > Christ, you're right.
Oops, i tried to write Chris, but i failed. Sorry.
If it's of any help, I reported a similar bug (the fact that the regular expression now needed "(unsigned long)" potentially at the start) for the vmware server product, the only license was the free one they provide to everybody, and sure enough it was fixed in their latest version of the config file for that product (and so presumably in all further releases of their other products). You'll find it in vmware-server 1.0.0.22874 onwards. I don't know whether it will fix the double digit problem mentioned in this bug slightly later on, but they will listen if you continue to post bugs and provide them with patches... app-emulation/vmware-workstation-5.5.1.19175-r2's vmware-config.pl still complains when run using sys-kernel/gentoo-sources-2.6.16-r1 with # CONFIG_VMSPLIT_3G is not set CONFIG_VMSPLIT_3G_OPT=y # CONFIG_VMSPLIT_2G is not set # CONFIG_VMSPLIT_1G is not set Adding "print "$gSystem{'page_offset'} $header_page_offset\n";" as suggested in comment #18 shows: 80000000 B0000000 Unfortunately, none of the suggested patches in this bug report fix the problem. Created attachment 84000 [details, diff]
patch for vmware-config.pl
Hi,
i've written a patch. This is highly experimental, and i wish, that VMWare would provide a official patch, but me or somebody else must first report the problem to VMWare - perhaps including the attache patch.
This patch should detect all 0xFF000000-aligned page-offsets properly - but who knows, what strange kernel exist out there.
(In reply to comment #29) > Created an attachment (id=84000) [edit] > patch for vmware-config.pl Thanks, this patch works for me. > i've written a patch. This is highly experimental, and i wish, that VMWare > would provide a official patch, but me or somebody else must first report the > problem to VMWare - perhaps including the attache patch. Yes. Go ahead. :-) Patch in comment #29 *does not* work for me. It prints out "Detected page-offset: c0000000" and I end up with the same error message regarding different address space sizes. Portage 2.1_pre7-r4 (default-linux/x86/2005.0, gcc-4.0.3, glibc-2.4-r1, 2.6.16-gentoo-r1 i686) ================================================================= System uname: 2.6.16-gentoo-r1 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.8.1-r1, 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -mfpmath=sse" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /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/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -mfpmath=sse" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://mirror.clarkson.edu/pub/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac acpi alsa avi berkdb bitmap-fonts cdr crypt cups dri dvd eds emboss encode faad firefox flac foomaticdb gdbm gif gnome gtk gtk2 hal imlib ipv6 isdnlog jpeg libg++ libwww mad mikmod mmap motif mp3 mpeg ncurses nptl nptlonly offensive ogg oggvorbis opengl pam pdflib perl pic png ppds pppd python quicktime readline real sdl spell sse ssl tcpd truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_ati video_cards_vesa" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS did you apply the patch to the newest ~x86 version of vmware? My patch did only tried to fix the detection of the pageoffset via reading /proc/kallsyms. It did not include the other fix, that takes care of properly extracting the pageoffset from the kernel-headers. c0000000 seems very right to me, if you have CONFIG_VMSPLIT_3G=y What does your kernel-config say, which vmsplit are you using? WFM, with the ~x86 ebuild and the patch for vmware-config.pl THX! The patch worked smoothly for me! THX!!! re: comment #32 My apologies, I had applied the patch to the version I already had installed. I just upgraded to the latest ~x86 ebuild and the modules built successfully. Please try the latest ebuild revisions. I've updated to update101, which should fix 2.6.16 building issues. i tried the update101-version yesterday evening: it didn't work. i've got the 3G/1G split optimized for 1G lowmem. OK, there's a bunch of patches in here, and I'm having toruble following. The 2.6.16 kernel stuff is probably going tsable very soon, so *exactly* which patches do I need to apply to get this working? Thanks (In reply to comment #38) > OK, there's a bunch of patches in here, and I'm having toruble following. The > 2.6.16 kernel stuff is probably going tsable very soon, so *exactly* which > patches do I need to apply to get this working? Well, for me at least, none of the patches attached seem to take care of all four options correctly. I've tried them all using sys-kernel/gentoo-sources-2.6.16-r1 and app-emulation/vmware-workstation-5.5.1.19175-r3 and still... "The kernel defined by this directory of header files does not have the same address space size as your running kernel." I've always found a combination that gave the above result and I ended up commenting out that test. IMHO, there are three options now: 1. Wait for upstream to fix this issue. Not exactly my favourite. 2. Comment out the test. Gentoo is not exactly a mainstream distribution. Can we expect Gentoo users to give vmware-config the correct path to their kernel? I think so. Not a good solution either and a few people *will* get it wrong but still better than the current situation, IMHO. 3. Test the patches, compare them, fix them. Test against all four possible VMSPLIT options. This requires some effort but is, IMHO, the only clean and correct solution. To me what's going on here looks like trial & error. A patch that works for one quarter of the world gets attached and then another for another quarter and, best of all, the patches conflict with each other. Until someone starts testing *systematically* we won't get anywhere any time soon, I think. (In reply to comment #29) > Created an attachment (id=84000) [edit] > patch for vmware-config.pl thank you Sven I use vmware-player-1.0.1.19317-r3.ebuild the only ebuild present atm in portage. It already use patch 101 any-any gentoo kernel 2.6.16-gentoo-r3 with these option active [I have 1gb ram] High Memory Support (4GB) Memory split (3G/1G user/kernel split (for full 1G low memory)) Duh... I meant /etc/dhcp/dhcpd.conf no /etc/dhcp/dhcp.conf (forgot the extra d on the end there, sorry) *** Bug 135091 has been marked as a duplicate of this bug. *** *** Bug 139707 has been marked as a duplicate of this bug. *** Can you test the new 5.5.2 ebuild? It is currently masked due to it requiring vmware-modules-1.0.0.15 (which pulls down the vmware server sources) but otherwise is perfectly good to be used. The vmware-modules ebuilds doen't have this problem anymore. Simply due to the fact, that they don't use the vmware-config.pl script anymore - or do they? Well, never had problems again. So this bug can be closed, IMHO. Sounds about right... we don't use vmware-config.pl for compiling, but portage. *** Bug 128223 has been marked as a duplicate of this bug. *** |