Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Kernel 2.6.31 under Mandriva 2009.0

I tried to experiment with my Mandriva 2009.0 install using the latest kernel build 2.6.31 from an unofficial backport repository for Mandriva 2009.1. I patched the kernel to support init_mm and successfully compiled it into kernel-desktop and kernel-desktop-devel variants for Mandriva.

Now, I tried to install NIKAL 1.10 for this kernel, it worked in the first try.:-

[root@localhost ~]# lsmod | grep ni
niorbk                118420  1
nipalk               1403312  3 niorbk
nikal                  67656  3 nipalk
[root@localhost ~]# uname -r
2.6.31-desktop-2.1mnb
[root@localhost ~]#

After this, I went ahead for NI-VISA 4.5.0 using the same procedure as for 2009.0.

As you can see, nikal, nipall and niorb have been successfully installed. However, I don't see the other NI modules (pxi etc) in this. This did leave me confused, as I ran an updateNIdrivers and it came out successfully, saying that all of the NI-VISA modules have been installed. I also see this dump from dmesg:-

nikal: module license 'Copyright (c) 2002-2009 National Instruments Corporation.  All Rights Reserved.  Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <http://www.ni.com/linux/>.' taints kernel.


Disabling lock debugging due to kernel taint


Symbol init_mm is marked as UNUSED, however this module is using it.


This symbol will go away in the future.


Please evalute if this is the right api to use and if it really is, submit a report the linux kernel mailinglist together with submitting your code for inclusion.


Netfilter messages via NETLINK v0.30.


nf_conntrack version 0.5.0 (16235 buckets, 64940 max)


CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use


nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or


sysctl net.netfilter.nf_conntrack_acct=1 to enable it.


BUG: unable to handle kernel NULL pointer dereference at (null)


IP: [<(null)>] (null)


*pde = 00000000


Oops: 0000 [#1] SMP


last sysfs file: /sys/devices/pci0000:0

0/0000:00:00.0/class


Modules linked in: niorbk(P+) xt_connmark xt_CLASSIFY xt_tcpudp xt_state iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack iptable_mangle nipalk(P) nfnetlink nikal(P) ipv6 iptable_filter ip_tables x_tables binfmt_misc loop fuse dm_mirror dm_region_hash dm_log dm_mod cpufreq_ondemand cpufreq_conservative cpufreq_powersave acpi_cpufreq freq_table hdaps input_polldev snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep usbhid sdhci_pci hid snd_seq_dummy arc4 ecb sdhci thinkpad_acpi iwl3945 iwlcore mac80211 pcmcia cfg80211 i2c_i801 mmc_core led_class ricoh_mmc i2c_core snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss iTCO_wdt snd_pcm snd_timer snd_mixer_oss snd yenta_socket rsrc_nonstatic pcmcia_core nvram rtc_cmos iTCO_vendor_support video battery ac evdev joydev pcspkr soundcore tg3 rfkill output libphy snd_page_alloc thermal button processor sr_mod sg sbp2 ohci1394 ieee1394 ahci ata_piix libata sd_mod scsi_mod crc_t10dif ext3 jbd uhci_hcd ohci_hcd ehci_hcd usbcore [last unloaded: scsi_wait_scan]

Pid: 2200, comm: modprobe Tainted: P           (2.6.31-desktop-2.1mnb #1) 8937A13
EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 0
EIP is at 0x0
EAX: f819ebc0 EBX: 00000000 ECX: f819ec00 EDX: 00000000
ESI: f819ec00 EDI: 0004bdb6 EBP: f6665fac ESP: f6665f80
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process modprobe (pid: 2200, ti=f6664000 task=f62818e0 task.ti=f6664000)
Stack:
c0185455 c0206c4d f6665f90 b7e6cdbe 0004bdb6 00000000 b7e21008 8e5c9bb4
<0> b7e21008 08714378 b806b5d0 f6664000 c0103ffb b7e21008 0004bdb6 08714378
<0> 08714378 b806b5d0 00000003 00000080 0000007b 0000007b 00000000 00000033
Call Trace:
[<c0185455>] ? sys_init_module+0xc5/0x230
[<c0206c4d>] ? sys_read+0x5d/0xb0
[<c0103ffb>] ? sysenter_do_call+0x12/0x28
Code:  Bad EIP value.
EIP: [<00000000>] 0x0 SS:ESP 0068:f6665f80
CR2: 0000000000000000
---[ end trace 351cda91d405f722 ]---
tg3 0000:04:00.0: PME# disabled
tg3 0000:04:00.0: irq 30 for MSI/MSI-X

Seems like something has crashed from the dmesg output?I would appreciate some help on this...(calling Shawn ), and would do more experiments if needed.

I have the backported 2.6.31 kernels for Mandriva 2009.0 on my laptop, so if anyone's interested in experimenting with the latest kernel...lemme know

0 Kudos
Message 1 of 14
(15,282 Views)

Does NI plan to support the 2.6.3x kernels any time soon? The NI salesmen speak about how wonderful annual support is, but we're not seeing any action on modern kernel support, grumble, grumble...

I tried compiling a Fedora 2.6.30 kernel, patching in init_mm support, but I got nowhere with it... (sorry, I didn't record the problems).

- Mike

0 Kudos
Message 2 of 14
(6,755 Views)

Hey Anshul,

It looks like you crashed your kernel.  Unfortunately I can't quite tell if this is caused by the NI drivers or just a kernel bug.  You can see from the Oops output that the crash occurred while running modprobe to load a module.  The question is which module was loading at the time of the crash?  It looks like nikal, nipalk, and niorbk have all loaded, so I don't know if it was one of those three or perhaps the "next" module that we tried to load.

If this is easy to reproduce you could try using modprobe to load each module one at a time, and check dmesg in between to see what triggers it.  You will probably need to disable the /etc/init.d/nipal init script because it will try to load the modules at boot time.  Depending on your distribution you should be able to use a GUI or run something like:

# disable the init script

chkconfig --del nipal

# enable the init script

chkconfig --add nipal

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 3 of 14
(6,753 Views)

Hey Mike,

Make sure you grumble to your local NI sales rep, they are the best person to drive any feature requests.  To answer your question though the earliest you will see 2.6.3x support would be when one of our officially supported distros ships with a 2.6.3x kernel.  This probably means openSUSE 11.2.  I can't guarantee we will have the support when openSUSE 11.2 releases, but hopefully if we don't run into an unexpected problems we may be able to release a NI-KAL update sometime after.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 4 of 14
(6,755 Views)

Shawn,

Any chance that Mandriva is one of these supported distros ? I am surely gonna grumble to my local sales rep (my LV license is up for renewal soon) about Mandriva being removed. Jokes aside..it seems like Mandriva's kernels play well with NIKAL/VISA than Opensuse's kernels. Opensuse's 11.1/2.6.27 kernel has some weird workarounds from Shawn...while Mandriva 2009.0's 2.6.27 is probably the easiest install among all distros that get mentioned here (Ubuntu, Fedora, Opensuse, Gentoo etc).

-Anshul

0 Kudos
Message 5 of 14
(6,755 Views)

Shawn,

I had thought as such, that the kernel has probably crashed...but I wasn't 100% sure. Tomorrow, i'll try your steps and see if it works. Any idea on when will we a workaround for the init_mm thing on NI-KAL come out? If there's a beta/alpha version you have...I'd give that a shot on as well

-Anshul

0 Kudos
Message 6 of 14
(6,753 Views)

Shawn,

It seems like nipal is crashing the kernel. I did a chkconfig --del nipal and chkconfig --add nipal, here is the output from dmesg:-

BUG: unable to handle kernel NULL pointer dereference at (null)                    
IP: [<(null)>] (null)                                                              
*pde = 00000000                                                                    
Oops: 0000 [#2] SMP                                                                
last sysfs file: /sys/module/niorbk/initstate                                      
Modules linked in: NiViPciK(P+) ipt_IFWLOG ipt_psd ip_set_iptree xt_time xt_connlimit xt_realm iptable_raw xt_comment xt_recent xt_policy ipt_ULOG ipt_set ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_LOG ipt_ECN ipt_ecn ipt_CLUSTERIP ipt_ah ipt_addrtype nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp nf_conntrack_amanda nf_conntrack_sane nf_conntrack_tftp nf_conntrack_sip nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns aes_i586 aes_generic i915 drm nf_conntrack_irc i2c_algo_bit nf_conntrack_h323 nf_conntrack_ftp ip_set_portmap ip_set_macipmap ip_set_ipmap ip_set_iphash ip_set xt_tcpmss xt_pkttype xt_physdev xt_owner xt_NFQUEUE xt_NFLOG nfnetlink_log xt_multiport xt_MARK xt_mark xt_mac xt_limit xt_length xt_iprange xt_helper xt_hashlimit xt_DSCP xt_dscp xt_dccp xt_conntrack xt_CONNMARK xt_connmark xt_CLASSIFY xt_tcpudp xt_state iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack af_packet iptable_mangle nfnetlink niorbk(P+) nipalk(P) nikal(P) iptable_filter ip_tables x_tables binfmt_misc loop fuse dm_mirror dm_region_hash dm_log dm_mod cpufreq_ondemand cpufreq_conservative cpufreq_powersave acpi_cpufreq freq_table hdaps input_polldev snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep arc4 snd_seq_dummy ecb pcmcia snd_seq_oss snd_seq_midi_event iwl3945 yenta_socket snd_seq iTCO_wdt rsrc_nonstatic iwlcore tg3 sdhci_pci sdhci ricoh_mmc i2c_i801 thinkpad_acpi rtc_cmos pcspkr mac80211 mmc_core joydev libphy evdev i2c_core battery led_class video ac sr_mod sg snd_seq_device iTCO_vendor_support output processor button pcmcia_core nvram thermal snd_pcm_oss snd_pcm snd_timer snd_mixer_oss snd cfg80211 rfkill soundcore snd_page_alloc sbp2 ohci1394 ieee1394 ide_pci_generic ide_gd_mod ide_core ata_generic pata_acpi ahci ata_piix libata sd_mod scsi_mod crc_t10dif ext3 jbd uhci_hcd ohci_hcd ehci_hcd usbcore [last unloaded: scsi_wait_scan]

Pid: 5376, comm: modprobe Tainted: P      D    (2.6.31-desktop-2.1mnb #1) 8937A13
EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 0
EIP is at 0x0
EAX: f8590930 EBX: 00000000 ECX: f8590940 EDX: 00000000
ESI: f8590940 EDI: 0002e78b EBP: e4631fac ESP: e4631f80
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process modprobe (pid: 5376, ti=e4630000 task=d9c00000 task.ti=e4630000)
Stack:
c0185455 c0206c4d e4631f90 b7d60793 0002e78b 00000000 b7d32008 8a9ae9db
<0> b7d32008 09416e58 00000000 e4630000 c0103ffb b7d32008 0002e78b 09416e58
<0> 09416e58 00000000 09418348 00000080 8a9a007b c016007b 00000000 00000033
Call Trace:
[<c0185455>] ? sys_init_module+0xc5/0x230
[<c0206c4d>] ? sys_read+0x5d/0xb0
[<c0103ffb>] ? sysenter_do_call+0x12/0x28
[<c016007b>] ? sys_setdomainname+0x7b/0xf0
Code:  Bad EIP value.
EIP: [<00000000>] 0x0 SS:ESP 0068:e4631f80
CR2: 0000000000000000
---[ end trace 873c2443e7af7920 ]---
[root@sagarika ~]#

There is some mention about last sysfs file at /sys/modules/niorbk.

-Anshul

Message was edited by: Anshul Jain

0 Kudos
Message 7 of 14
(6,753 Views)

Anshul/Shawn,

Have you had any more luck with this?  I'm also interested in getting NI-KAL and NI-DAQmx installed on Mandriva 2009.0 w/ 2.6.31 (and the -rt19 patch).

I followed http://forums.ni.com/ni/board/message?board.id=140&message.id=35832&query.id=289319#M35832modified and modified /usr/local/natinst/nikal/src/config line 88 to find pte_offset_kernel:

pte_offset_kernel=`$GREP -d skip pte_offset_kernel $headersDir/include/asm/*  $headersDir/arch/x86/include/asm/* | $GREP -wc pte_offset_kernel`

Then I ran `sudo ./configure` and `sudo make`.  make warned about init_mm being undefined, and then `sudo make install` failed to start NI-KAL (v1.9).

I was thinking about following http://decibel.ni.com/content/docs/DOC-4511 and modifying /usr/src/linux/arch/x86/kernel/init_task.c:

static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_UNUSED_SYMBOL(init_mm);

But I'm unsure if this is what has already been tried and what is will do.

Any suggestions would be greatly appreciated. Thanks,

-Justin

0 Kudos
Message 8 of 14
(6,753 Views)

One note to clarify, annual support is wonderful for Windows and software that is updated on an annual basis.  Currently Linux drivers are not a part of the guarantee for annual support.  If that is important to customers, it is best that we hear about it through your sales engineer so that we can gauge customer interest to drive the decision to invest in this area.

0 Kudos
Message 9 of 14
(6,755 Views)

I've grumbled enough about NI-KAL and Labview to my local sales engineer in India. They're really clueless about NI products on Linux. The lack of proper support was enough for me to block a set of new licenses for Labview and also additional hardware purchase. As a customer, we really cannot do anything beyond this. Its a classic chicken and egg problem...customer wants drivers (even though they're unsupported) and the company wants funds to justify support. Neither are coming through as of now

It would be simply great to have an NI-KAL release for Kernels 2.6.31 and greater.

0 Kudos
Message 10 of 14
(6,755 Views)