# unable to handle kernel NULL pointer dereference [solved]

## samo

When I try to emerge openoffice-bin-3.1.1 my system crashes and I get the following error message during installing /usr/lib/openoffice/basis3.1/share/config/images.zip:

```
BUG: unable to handle kernel NULL pointer dereference at 00000004
```

 What's going wrong?Last edited by samo on Mon Sep 28, 2009 5:57 pm; edited 2 times in total

----------

## eccerr0r

 *samo wrote:*   

> 
> 
> ```
> BUG: unable to handle kernel NULL pointer dereference at 00000004
> ```
> ...

 

Unfortunately this tells as much about the information as to what went wrong as saying "My stomach hurts."  The other apparently gibberish that prints along with this shows more details of what went wrong.

However usually when you emerge something and the kernel oopses like this, it's likely due to bad RAM or CPU overheating.  See if it's repeatable.  Likely it won't fail in the same place if you simply emerge again...

----------

## samo

This problem is reproducible every time.

There are no other error messages. The failure occurs during the installation of the above mentioned file. All other files are copied correctly.

The system freeze totally. That's why I can't copy additional information.

What information could be helpful?

```
# emerge --info      

Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.31-gentoo i686)                                                        

=================================================================                

System uname: Linux-2.6.31-gentoo-i686-AMD_Athlon-tm-_XP_3200+-with-gentoo-1.12.11.1                                                                              

Timestamp of tree: Thu, 24 Sep 2009 19:00:20 +0000                               

app-shells/bash:     4.0_p28                                                     

dev-java/java-config: 2.1.8-r1                                                   

dev-lang/python:     2.6.2-r1                                                    

dev-util/cmake:      2.6.4                                                       

sys-apps/baselayout: 1.12.11.1                                                   

sys-apps/sandbox:    1.6-r2                                                      

sys-devel/autoconf:  2.13, 2.63-r1                                               

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                        

sys-devel/binutils:  2.18-r3                                                     

sys-devel/gcc-config: 1.4.1                                                      

sys-devel/libtool:   2.2.6a                                                      

virtual/os-headers:  2.6.27-r2                                                   

ACCEPT_KEYWORDS="x86"                                                            

CBUILD="i686-pc-linux-gnu"                                                       

CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"                         

CHOST="i686-pc-linux-gnu"                                                        

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"                                          

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"                                           

CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"                       

DISTDIR="/usr/portage/distfiles"                                                 

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                    

GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"             

LC_ALL="de_DE.UTF-8"                                                             

LDFLAGS="-Wl,-O1"                                                                

LINGUAS="de"                                                                     

PKGDIR="/usr/portage/packages"                                                   

PORTAGE_CONFIGROOT="/"                                                           

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                     

PORTAGE_TMPDIR="/mnt/store/portage"                                              

PORTDIR="/usr/portage"                                                           

SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                   

USE="3dnow 3dnowext X a52 aac acl acpi alsa amarok amazon apache2 audiofile avi berkdb branding bzip2 cairo cdr cjk cli consolekit cracklib crypt css cups curl dbus disk-partition dri dts dvb dvd dvdr dvdread eds embedded emboss encode esd evo fam fbcondecor ffmpeg firefox flac fortran gd gdbm gif gimp gimpprint gpg gpm gstreamer gtk2 hal history iconv ipv6 isdnlog java jpeg json kde kdeenablefinal kerberos lan ldap libnotify libv4l2 libwww mad mikmod mjpeg mmx mng modules mp3 mp4 mpeg mplayer mudflap mysql mythtv ncurses nls nptl nptlonly nsplugin odbc ogg oggvorbis opengl openmp oss pam pcre pdf perl phonon png posix ppds pppd python qt3support qt4 quicktime rdesktop readline reflection reiserfs rtc rtsp samba scanner sdl session slp spell spl sql sse ssl startup-notification stream svg sysfs tcltk tcpd threads threadsafe thunar tiff truetype udev unicode usb userlocales v4l2 vcd vorbis webkit wicd win32codecs winbind x264 x86 xml xorg xulrunner xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="fbdev vga radeon"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

----------

## Hu

Start with posting the rest of the oops message, including the traceback and the taint line.

----------

## samo

Is there a simple way to do that, when the system is totally freeze and I need to reboot.

Could I find the oops message, traceback and the taint line anywhere after reboot?

----------

## Hu

Maybe.  Do you have your kernel console attached to a serial line or a printer?  The kernel will not record the oops anywhere on the faulting system, because of the risk of causing further damage if it uses potentially corrupt data structures to find a file in which to store the data.  You need to write it down, or have some other machine hooked up to receive the oops over serial/parallel port and record it there.

----------

## eccerr0r

 *samo wrote:*   

> This problem is reproducible every time.
> 
> 

 

Do you mean it will oops at all, or will it oops at the exact same point at the same time of the program (with exact same oops message, including the stack trace and register contents (data registers))?

Big difference here.  If it's the former, it's likely hardware issues; if it's the latter, it's more likely software.

If you have another computer, you could set up serial console and have the other machine capture.

----------

## samo

It always oops at the exact same point and time of the installation process.

If I would knew, how to do it, I could try to setup a serial console. I have to search for a manual first.

----------

## krinn

pen and paper are still usable you know...

----------

## eccerr0r

A lot of the hex numbers in the report are somewhat useless as each gentoo system is different from one another.  Some key things that are useful are to grab:

The process line that includes the program that failed

The line containing 'Tainted' so we know if this is a single or double fault

The call stack function names

As a quick fix you should try to make clean and recompile your latest kernel to see if the problem goes away...

----------

## Hu

Even though none of us will have his kernel, once he has the numbers recorded in a file, he can perform the address to name lookup using his kernel map, and provide us with the translated data.  Some oops messages contain enough symbolic information to be useful on their own, even without a manual name lookup step.

----------

## eccerr0r

True, he should have his map files around (and hence the symbolic names should show up), but the less hex he has to copy by hand, the more likely he will do it  :Smile: 

(Just saying that things like the register contents of EAX, etc., may not be valuable at this point...)

----------

## samo

I solved the problem with reiserfsck --rebuild-tree.

Thanks for your help.

----------

## eccerr0r

I suppose for posterity, I bet that there would be instances of symbols with "reiserfs" in the call stack, pointing us to try to test your disk structures...

Then again, some of this should be dumped in your dmesg indicating there are corrupt reiserfs structures?

Oh well, it's fixed now, hopefully this will help others that run into this same issue -- reemphasis on the heading "oops" is not very helpful in debug  :Smile: 

----------

