Thursday, April 29, 2010

kobject: '' (ffff8800d8d6d738): is not initialized, yet kobject_put() is being called.

[10558.028047] ------------[ cut here ]------------
[10558.028054] WARNING: at /tmp/buildd/linux-2.6-2.6.30/debian/build/source_amd64_none/lib/kobject.c:595 kobject_put+0x2f/0x42()
[10558.028057] Hardware name: Precision M6300
[10558.028059] kobject: '' (ffff8800d8d6d738): is not initialized, yet kobject_put() is being called.
[10558.028061] Modules linked in: usbhid hid snd_usb_audio pwc snd_usb_lib videodev v4l1_compat v4l2_compat_ioctl32 cryptd aes_x86_64 aes_generic binfmt_misc sco bridge stp bnep rfcomm l2cap bluetooth vboxnetflt vboxnetadp vboxdrv ppdev parport_pc lp parport acpi_cpufreq cpufreq_userspace cpufreq_stats cpufreq_powersave cpufreq_conservative reiserfs firewire_sbp2 loop joydev snd_hda_codec_idt snd_hda_intel snd_hda_codec arc4 snd_hwdep snd_pcm_oss snd_mixer_oss ecb snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq iwlagn iwlcore snd_timer snd_seq_device psmouse mac80211 video i2c_i801 dell_laptop rfkill snd output wmi serio_raw pcspkr evdev ac dcdbas cfg80211 button battery nvidia(P) processor i2c_core soundcore snd_page_alloc ext2 mbcache dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sd_mod crc_t10dif ide_cd_mod cdrom ata_piix ata_generic tg3 libata scsi_mod piix sdhci_pci sdhci firewire_ohci libphy mmc_core firewire_core crc_itu_t ricoh_mmc led_class ide_pci_generic ide_core ehci_hcd uhci_hcd intel_agp thermal fan thermal_sys [last unloaded: scsi_wait_scan]
[10558.028134] Pid: 2002, comm: hald-addon-inpu Tainted: P 2.6.30-bpo.1-amd64 #1
[10558.028136] Call Trace:
[10558.028139] [] ? kobject_put+0x2f/0x42
[10558.028141] [] ? kobject_put+0x2f/0x42
[10558.028145] [] ? warn_slowpath_common+0x77/0xa3
[10558.028148] [] ? warn_slowpath_fmt+0x51/0x59
[10558.028153] [] ? wait_for_common+0xe2/0x148
[10558.028155] [] ? default_wake_function+0x0/0x9
[10558.028159] [] ? __bitmap_weight+0x3a/0x7e
[10558.028161] [] ? kobject_put+0x2f/0x42
[10558.028168] [] ? evdev_free+0x20/0x29 [evdev]
[10558.028171] [] ? device_release+0x41/0x6a
[10558.028174] [] ? kobject_release+0x48/0x5e
[10558.028176] [] ? kobject_release+0x0/0x5e
[10558.028178] [] ? kref_put+0x41/0x4c
[10558.028182] [] ? evdev_release+0xcf/0xd9 [evdev]
[10558.028186] [] ? __fput+0xc6/0x16e
[10558.028189] [] ? filp_close+0x5b/0x62
[10558.028191] [] ? sys_close+0x94/0xcd
[10558.028195] [] ? system_call_fastpath+0x16/0x1b
[10558.028197] ---[ end trace b3b4b30111f41f7e ]---

Saturday, April 10, 2010

Exporting the DICOM Standard to docbook

I have finally found sometime to update PS 3.3 XML in GDCM using the newest standard: PS 3.3 - 2009.

It seems however that there has been some internal changes in OpenOffice.org and the docbook export function does not work as well as it used to be.

For instance see this bug report:

http://www.openoffice.org/issues/show_bug.cgi?id=110762

Tuesday, April 6, 2010

valgrind and iostream/locale

$ valgrind --tool=drd ./a.out

==16240== Conflicting load by thread 3 at 0x05132eb9 size 1
==16240== at 0x4ED44D3: std::ostream& std::ostream::_M_insert(long) (in /usr/lib/libstdc++.so.6.0.13)
==16240== by 0x400C48: threadEntry(void*) (threads.cpp:12)
==16240== by 0x4C32870: vgDrd_thread_wrapper (drd_pthread_intercepts.c:272)
==16240== by 0x55E8A03: start_thread (pthread_create.c:300)
==16240== by 0x58DD80C: clone (clone.S:112)
==16240== Allocation context: BSS section of /usr/lib/libstdc++.so.6.0.13
==16240== Other segment start (thread 2)
==16240== at 0x4C29F2F: pthread_mutex_unlock (drd_pthread_intercepts.c:633)
==16240== by 0x4EA387E: std::locale::locale() (in /usr/lib/libstdc++.so.6.0.13)
==16240== by 0x4E9FE5F: std::ios_base::_M_init() (in /usr/lib/libstdc++.so.6.0.13)
==16240== by 0x4EB4768: std::basic_ios<char, std::char_traits >::init(std::basic_streambuf<char, std::char_traits >*) (in /usr/lib/libstdc++.so.6.0.13)
==16240== by 0x4ED7DEA: std::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode) (in /usr/lib/libstdc++.so.6.0.13)
==16240== by 0x400C21: threadEntry(void*) (threads.cpp:11)
==16240== by 0x4C32870: vgDrd_thread_wrapper (drd_pthread_intercepts.c:272)
==16240== by 0x55E8A03: start_thread (pthread_create.c:300)
==16240== by 0x58DD80C: clone (clone.S:112)
==16240== Other segment end (thread 2)
==16240== at 0x58ACEB7: sched_yield (in /lib/libc-2.10.1.so)
==16240== by 0x400C63: threadEntry(void*) (threads.cpp:14)
==16240== by 0x4C32870: vgDrd_thread_wrapper (drd_pthread_intercepts.c:272)
==16240== by 0x55E8A03: start_thread (pthread_create.c:300)
==16240== by 0x58DD80C: clone (clone.S:112)
Hello Jorge,

Unfortunately not all libraries have been designed with data-race detection tools in mind. Several libraries contain code that triggers benign data races. Examples are the I/O code in libstdc++ and in libc.

You can either create a suppression pattern to suppress the above races, or even simpler, add the following code in main() before thread creation starts:

std::ostringstream dummy;
dummy << 0;


The above code will make sure that locale initialization, which is triggered by sending an number to an I/O stream, will happen before any threads are created and hence no races will be reported anymore on locale initialization.

Friday, April 2, 2010

E: installing Assembly /usr/lib/cli/gmime-sharp-2.2/gmime-sharp.dll failed

While setting up a new hybrid debian stable + backports, I got this strange error during a 'apt-get install gnome'.

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 130 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up libgmime2.2-cil (2.2.22-2) ...
* Installing 1 assembly from libgmime2.2-cil into Mono
E: installing Assembly /usr/lib/cli/gmime-sharp-2.2/gmime-sharp.dll
failed
E: Installation of libgmime2.2-cil
with /usr/share/cli-common/runtimes.d/mono failed
dpkg: error processing libgmime2.2-cil (--configure):
subprocess installed post-installation script returned error exit
status 9
dpkg: dependency problems prevent configuration of tomboy:
tomboy depends on libgmime2.2-cil (>= 2.2.20); however:
Package libgmime2.2-cil is not configured yet.
dpkg: error processing tomboy (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libgmime2.2-cil
tomboy
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is already reported:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520267