All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb
@ 2002-08-29  9:22 jsoe0708
  2002-08-29  9:51 ` jsoe0708
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: jsoe0708 @ 2002-08-29  9:22 UTC (permalink / raw)
  To: parisc-linux

Hi all,

I need to go back to kernel 2.4.18-pa61 and evms-1.0.1 (see problem in ml:
http://lists.parisc-linux.org/pipermail/parisc-linux/2002-August/017368.html
with last 1.1.0 evsm release)

Kernel build and operate correctly. I so recompile tools with -ggdb gcc
option.
Then I use ddd to try to debug problem.

So I first run without break and got from console:
evms_vgscan(7998): unaligned access to 0x0002aaae at ip=0x4020a0e3

So I put a break early in main (Ok), relaunch run and try now to insert
a breack in gdb window:
b *0x4020a0e3

Accepted but when 'continue' is launch:
warning: Cannot insert breakpoint 2:
Cannot access memory at address 0x4020a0e3

What do I wrong or what should I better do?

Thanks in advance for help,
    Joel

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb
@ 2002-08-29 13:56 jsoe0708
  0 siblings, 0 replies; 21+ messages in thread
From: jsoe0708 @ 2002-08-29 13:56 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: parisc-linux

Hi Carlos,

>
>Joel,
>
>> I need to go back to kernel 2.4.18-pa61 and evms-1.0.1 (see problem in
>ml:
>> http://lists.parisc-linux.org/pipermail/parisc-linux/2002-August/017368.html
>> with last 1.1.0 evsm release)
>
>Why do you need to regress versions?
Because:
"To investigate in more details the 'unalign access' problem I met with
evms,
I need first to upgrade to evms-1.1.0 with kernel 2.4.19.

After this upgrade, all evms tools failled and I got folowing kernel message
at the console:
kernel BUG at blkpg.c:252!
evms: ldev_mgr: error(-28): creating logical disk for device(8,0)."

The willy answer:
"Aw, crap.  It now seems to be `legal' to put_user a 64-bit argument on
a
32-bit system.  Someone needs to fix this in include/asm-parisc/uaccess.h"

But I am not able ($&##?? asm) to do.

>
>> Kernel build and operate correctly. I so recompile tools with -ggdb gcc
>> option. Then I use ddd to try to debug problem.
>
>What did you recompile with "-g"?

All evms tools and libs (from tarball the 'configure' the -g is a default,
I just add gdb)

>
>> So I first run without break and got from console:
>> evms_vgscan(7998): unaligned access to 0x0002aaae at ip=0x4020a0e3
>
>The unaligned handler took care of it, everything should still
>be okay.
>
>> Accepted but when 'continue' is launch:
>> warning: Cannot insert breakpoint 2:
>> Cannot access memory at address 0x4020a0e3
>> What do I wrong or what should I better do?
>
>AFAIK we are using software breakpoints in gdb, which means that
>at certain times we _can't_ insert a breakpoint.
>
>I'm still unclear about the issues here. What's wrong with evms?
>It dies from a SIGBUS (unaligned handler failed)? SIGSEGV?
>Operates incorrectly?

First of all I would like to be sure it is absolutley harmless.
Secondly it also seems (to be verify [*]) to awfully slowing down evms management
tools.
Thanks for your attention,
    Joel

PS: [*] another lvm tool is the Sistina release which did not present this
kind of 'unaligne access' and has a behaviour nearly the same as on my i386
box on which I also test the two tools.

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb
@ 2002-09-02  8:47 jsoe0708
  2002-09-02 17:28 ` Grant Grundler
  0 siblings, 1 reply; 21+ messages in thread
From: jsoe0708 @ 2002-09-02  8:47 UTC (permalink / raw)
  To: Grant Grundler, Joel Soete; +Cc: John David Anglin, parisc-linux

>-- Original Message --
>To: Joel Soete <joel.soete@freebel.net>
>Cc: John David Anglin <dave@hiauly1.hia.nrc.ca>, jsoe0708@tiscali.be,
>	parisc-linux@lists.parisc-linux.org
>Subject: Re: [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb
>
>From: Grant Grundler <grundler@dsl2.external.hp.com>
>Date: Sat, 31 Aug 2002 17:50:15 -0600
>
>
>Joel Soete wrote:
>> Finaly this trial version of function:
>>
>>
>> BOOLEAN isa_null_partition_record(struct partition *p)
>> {
>>       if (p->boot_ind == 0x00 &&
>>           p->head == 0x00 &&
>>           p->sector == 0x00 &&
>>           p->cyl == 0x00 &&
>>           p->sys_ind == 0x00 &&
>>           p->end_head == 0x00 &&
>>           p->end_sector == 0x00 &&
>>           p->end_cyl == 0x00 &&
>>           p->start_sect == 0x00 &&
>>           p->nr_sects == 0x00 )
>>           return TRUE;
>
>Since start_sect and nr_sects are ints, this code will also generate an
>"unaligned data reference fault" like the original code did.

Trust me it does not? (it works fine)

>You need
>to find the origin of "struct partition *p" when the address is un-aligned.
>
Very hard to define:
a. the previous code works (again all odds)
b. the following trial code:
"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

typedef u_int8_t  BOOLEAN;

#ifndef TRUE
  #define TRUE  1
#endif
#ifndef FALSE
  #define FALSE 0
#endif

struct partition {
    unsigned char boot_ind;     /* 0x80 - active */
    unsigned char head;     /* starting head */
    unsigned char sector;       /* starting sector */
    unsigned char cyl;      /* starting cylinder */
    unsigned char sys_ind;      /* What partition type */
    unsigned char end_head;     /* end head */
    unsigned char end_sector;   /* end sector */
    unsigned char end_cyl;      /* end cylinder */
    unsigned int start_sect;    /* starting sector counting from 0 */
    unsigned int nr_sects;      /* nr of sectors in partition */
};

BOOLEAN isa_null_partition_record(struct partition *p)
{
    int          i;
    u_int32_t   *uip = (u_int32_t *) p;

    for (i=0; i<4; i++) {
        if (*uip!=0x00) return FALSE;
    }

    return TRUE;
}

int main(int argc, char * * argv, char * * env) {

    struct partition p1, p2;

    p1.boot_ind=0;
    p1.head=0;
    p1.sector=0;
    p1.cyl=0;
    p1.sys_ind=0;
    p1.end_head=0;
    p1.end_sector=0;
    p1.end_cyl=0;
    p1.start_sect=0;
    p1.nr_sects=0;

    printf("Is that p1 is a null partition: %u\n", isa_null_partition_record(&p1));

    p2.boot_ind=1;
    p2.head=2;
    p2.sector=3;
    p2.cyl=4;
    p2.sys_ind=5;
    p2.end_head=6;
    p2.end_sector=7;
    p2.end_cyl=8;
    p2.start_sect=9;
    p2.nr_sects=10;

    printf("Is that p2 is a null partition: %u\n", isa_null_partition_record(&p2));
    return 0;
}
"
did not reproduce the problem.


Even if in the previous code, I replace:
BOOLEAN isa_null_partition_record(struct partition *p)
{
    int          i;
    u_int32_t   *uip = (u_int32_t *) p;

    for (i=0; i<4; i++) {
        if (*uip!=0x00) return FALSE;
    }

    return TRUE;
}
by
extern BOOLEAN isa_null_partition_record(struct partition *p);

and also link it with the original library containing isa_null_partition_record,
I can no more reproduce the problem.

The only difference I can notice is that 'isa_null_partition_record' is
not directly used by evms tools but through modules loaded at run time (the
cause of gdb debug difficulties) (or am I wrong and a subtil detail escape
to my attention)?

What can I do to analyse this problem? (printing all p addresses and its
elements
during a run with the original code and compare with a run with modified
code?)

Thanks again for attention and help,
    Joel

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-09-02 17:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-29  9:22 [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb jsoe0708
2002-08-29  9:51 ` jsoe0708
2002-08-29 14:16   ` John David Anglin
2002-08-29 14:21   ` jsoe0708
2002-08-29 14:28     ` John David Anglin
2002-08-29 16:59       ` jsoe0708
2002-08-29 17:10         ` John David Anglin
2002-08-30  5:46           ` jsoe0708
2002-08-30 17:03             ` John David Anglin
2002-08-31 21:23               ` Joel Soete
2002-08-31 23:50                 ` Grant Grundler
2002-08-29 17:12         ` jsoe0708
2002-08-29 18:11           ` Grant Grundler
2002-08-30  5:53             ` jsoe0708
2002-08-30  6:30               ` Grant Grundler
2002-08-30  6:42                 ` jsoe0708
2002-08-29 12:42 ` Carlos O'Donell
2002-08-29 14:11 ` John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
2002-08-29 13:56 jsoe0708
2002-09-02  8:47 jsoe0708
2002-09-02 17:28 ` Grant Grundler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.