Read broken pipe

73 views
Skip to first unread message

sann_eey

unread,
Apr 5, 2010, 10:17:59 PM4/5/10
to Comedi: Linux Control and Measurement Device Interface
Hi All,

I am trying to use the comedi drivers with an NI-6052E board on
Mandriva 2010. I have a custom program written in C that I have been
using. The program acquires data continuously from 4 to 8 channels of
the card at 32KHz on each channel. It works just fine on Mandriva
2008. We recently got a new machine that runs Mandriva 2010 and the
code compiled just fine on this machine.

But, everytime I run it, it stops in 15 seconds with then crashes with
'read: Broken pipe'.

When I check 'dmesg', it gives the following comment
'unknown mite interrupt, ack! (ai_mite_status=82808248)

Any help in solving this would be greatly appreciated.

Thanks,
Raghav

sann_eey

unread,
Apr 6, 2010, 9:00:57 PM4/6/10
to Comedi: Linux Control and Measurement Device Interface
I also tried the cmd example in the demo in comedilib. Cmd works fine.
I then changed cmd.c and made the
options.freq = 32000;
and I changed
cmd->stop_src = TRIG_NONE;
after prepare_cmd_lib(....); to make it continuous acquisition. This
crashes after about 4 or 5s with "read: Broken pipe".

I tried setting the read and write buffers for the card to 3072k with
the comedi_config command, but that did not help either.

Any help or suggestions would be greatly appreciated.

Thanks,
Raghav

Klaus Dums

unread,
Jun 8, 2010, 8:46:12 AM6/8/10
to comed...@googlegroups.com
Hi!
As far as i know, the buffer size has to be equal to the pagesize of
your machine.
Try
int pageSize = sysconf(_SC_PAGESIZE);
or use getpagesize()

yours klaus

Ian Abbott

unread,
Jun 8, 2010, 10:15:49 AM6/8/10
to comed...@googlegroups.com
On 08/06/10 13:46, Klaus Dums wrote:
> As far as i know, the buffer size has to be equal to the pagesize of
> your machine.

No it doesn't (and it's usually larger), but the comedi kernel module
will round up the specified buffer size to a multiple of the page size.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abb...@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-

sann_eey

unread,
Jul 1, 2010, 1:28:35 AM7/1/10
to Comedi: Linux Control and Measurement Device Interface
Thanks for the replies. I still have the problem that I mentioned
earlier.

I changed cmd.c and made the options.freq = 32000;
and I changed cmd->stop_src = TRIG_NONE;
after prepare_cmd_lib(....); to make it continuous acquisition. This
crashes after about 4 or 5s with "read: Broken pipe".

I tried setting the read and write buffers for the card to 8192k with
the comedi_config command and that prolonged the time that the cmd
program ran. Cmd still crashes with broken pipe but after about 35s.

When I check 'dmesg', it gives the following comment
'unknown mite interrupt, ack! (ai_mite_status=82808248)
or sometimes it give the foll.
'unknown mite interrupt, ack! (ai_mite_status=82888248).

The program is being run on a new machine with an Intel core i7
processor with Mandriva 2010 and kernel version 2.6.33.4.
On an older machine with an Intel Core Duo processor machine, the
program runs fine with Mandriva 2008 and kernel version 2.6.33.4.
So, I wonder if it is an issue with the newer Inter core i7
processor.

Any help for this problem would be greatly appreciated.

Thanks,
Raghav

On Jun 8, 7:15 am, Ian Abbott <abbo...@mev.co.uk> wrote:
> On 08/06/10 13:46, Klaus Dums wrote:
>
> > As far as i know, the buffer size has to be equal to the pagesize of
> > your machine.
>
> No it doesn't (and it's usually larger), but the comedi kernel module
> will round up the specified buffer size to a multiple of the page size.
>
> --
> -=( Ian Abbott @ MEV Ltd.    E-mail: <abbo...@mev.co.uk>        )=-

tim....@gmail.com

unread,
May 16, 2013, 3:06:57 PM5/16/13
to comed...@googlegroups.com
Sorry to pile onto a very old thread, but I'm seeing the exact same error: a broken pipe, with lines like
[ 1558.984456] unknown mite interrupt, ack! (ai_mite_status=82808248)

Details:
09:0a.0 Unassigned class [ff00]: National Instruments PCI-6052E
(Note this is the _exact_ same card as sann_eey.)

2.6.32-5-amd64 #1 SMP

Intel(R) Xeon(R) CPU E5-2603 0 @ 1.80GHz

Some likely-relevant lines from dmesg:
[    6.335687] comedi: version 0.7.76 - http://www.comedi.org
[    6.346681] Available NI device IDs: 0x18b0
[    6.354638] [drm] nouveau 0000:04:00.0: Parsing VBIOS init table 2 at offset 0x86BC
[    6.354648] [drm] nouveau 0000:04:00.0: Parsing VBIOS init table 3 at offset 0x86DE
[    6.373966] comedi0: ni_pcimio: pci-6052e
[    6.373982] ni_pcimio 0000:09:0a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    6.379948] MITE:0xfb101000 mapped to ffffc90012632000 DAQ:0xfb100000 mapped to ffffc90012608000
[    6.379959] mite: version = 1, type = 1, mite mode = 1, interface mode = 3
[    6.379961] mite: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
[    6.379966] mite: fifo size is 64.
[    6.379968]  ( irq = 16 )

Sampling configuration: 250 kHz command-driven, pattern is to take 249 sequential samples from 1 channel and then 1 sample from another (then repeat).

This exact card worked with comedi in an older computer (and older comedi) a few years ago. The computer broke; we recently replaced it, moved the old card over, and installed a recent comedi.

If anyone has any ideas, I'd be delighted to hear them.

Best,
--Tim
Reply all
Reply to author
Forward
0 new messages