public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Some Debian elfutils issues
@ 2016-01-19  3:33 Kurt Roeckx
  0 siblings, 0 replies; 6+ messages in thread
From: Kurt Roeckx @ 2016-01-19  3:33 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

On Mon, Jan 18, 2016 at 03:35:47PM +0100, Mark Wielaard wrote:
> On Thu, 2016-01-14 at 00:22 +0100, Kurt Roeckx wrote:
> > On Wed, Jan 13, 2016 at 11:13:28PM +0100, Mark Wielaard wrote:
> > > I looked at the latest build logs:
> > > https://buildd.debian.org/status/package.php?p=elfutils
> > > [...]
> > > If you could try the attached patches on a new Debian build that would
> > > be appreciated.
> > 
> > I'll try it tomorrow or in the weekend.
> 
> Thanks for doing a build with the proposed patches. They seem to have
> solved the issues on kfreebsd and the hurd port builds again (but still
> fails one testcase). I have pushed the commits below to master.
> 
> The only thing that worries me is the sparc failure. I have CCed Jose
> who might want to take a look. What is strange is that 0.165-1 and
> 0.165-2 PASS on sparc just fine. And I don't see anything in 0.165-3
> that would explain the failure on sparc:
> https://buildd.debian.org/status/logs.php?pkg=elfutils&arch=sparc64

So I let it try again on sparc and it worked now.  No idea what is
going on.


Kurt

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

* Re: Some Debian elfutils issues
@ 2016-01-18 16:37 Jose E. Marchesi
  0 siblings, 0 replies; 6+ messages in thread
From: Jose E. Marchesi @ 2016-01-18 16:37 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]


    On Thu, 2016-01-14 at 00:22 +0100, Kurt Roeckx wrote:
    > On Wed, Jan 13, 2016 at 11:13:28PM +0100, Mark Wielaard wrote:
    > > I looked at the latest build logs:
    > > https://buildd.debian.org/status/package.php?p=elfutils
    > > [...]
    > > If you could try the attached patches on a new Debian build that would
    > > be appreciated.
    > 
    > I'll try it tomorrow or in the weekend.
    
    Thanks for doing a build with the proposed patches. They seem to have
    solved the issues on kfreebsd and the hurd port builds again (but still
    fails one testcase). I have pushed the commits below to master.
    
    The only thing that worries me is the sparc failure. I have CCed Jose
    who might want to take a look. What is strange is that 0.165-1 and
    0.165-2 PASS on sparc just fine. And I don't see anything in 0.165-3
    that would explain the failure on sparc:
    https://buildd.debian.org/status/logs.php?pkg=elfutils&arch=sparc64


The problem seems to be:

/«PKGBUILDDIR»/tests/backtrace: dwfl_thread_getframes: No DWARF information found

and that is probably triggered by this code in __libdwfl_frame_unwind:

Dwfl_Module *mod = INTUSE(dwfl_addrmodule) (state->thread->process->dwfl, pc);
if (mod == NULL)
  __libdwfl_seterrno (DWFL_E_NO_DWARF);

I definitely can't reproduce this problem in my own sparc64-*-* setups.

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

* Re: Some Debian elfutils issues
@ 2016-01-18 14:35 Mark Wielaard
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wielaard @ 2016-01-18 14:35 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]

On Thu, 2016-01-14 at 00:22 +0100, Kurt Roeckx wrote:
> On Wed, Jan 13, 2016 at 11:13:28PM +0100, Mark Wielaard wrote:
> > I looked at the latest build logs:
> > https://buildd.debian.org/status/package.php?p=elfutils
> > [...]
> > If you could try the attached patches on a new Debian build that would
> > be appreciated.
> 
> I'll try it tomorrow or in the weekend.

Thanks for doing a build with the proposed patches. They seem to have
solved the issues on kfreebsd and the hurd port builds again (but still
fails one testcase). I have pushed the commits below to master.

The only thing that worries me is the sparc failure. I have CCed Jose
who might want to take a look. What is strange is that 0.165-1 and
0.165-2 PASS on sparc just fine. And I don't see anything in 0.165-3
that would explain the failure on sparc:
https://buildd.debian.org/status/logs.php?pkg=elfutils&arch=sparc64

Thanks,

Mark

commit 0cd02dcafcfdaff56f483f41c0ec45de756c7083
Author: Mark Wielaard <mjw@redhat.com>
Date:   Wed Jan 13 23:06:33 2016 +0100

    tests: Skip dwfl-bug-fd-leak test if dwfl_linux_proc_report is unsupported.
    
    Signed-off-by: Mark Wielaard <mjw@redhat.com>

commit 624e3cb81d436282fa9f6ce4fa63203bad236057
Author: Mark Wielaard <mjw@redhat.com>
Date:   Wed Jan 13 22:57:03 2016 +0100

    elflint: Recognize ELFOSABI_FREEBSD which Debian kFreeBSD uses.
    
    Signed-off-by: Mark Wielaard <mjw@redhat.com>

commit d460773dd4fdeb98d9271f741e0a54f05ced876d
Author: Mark Wielaard <mjw@redhat.com>
Date:   Wed Jan 13 22:49:02 2016 +0100

    tests: Guard linux specific header includes with ifdef __linux__.
    
    Signed-off-by: Mark Wielaard <mjw@redhat.com>

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

* Re: Some Debian elfutils issues
@ 2016-01-13 23:40 Kurt Roeckx
  0 siblings, 0 replies; 6+ messages in thread
From: Kurt Roeckx @ 2016-01-13 23:40 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

On Wed, Jan 13, 2016 at 11:13:28PM +0100, Mark Wielaard wrote:
> The mips failures are a bit harder to fix since elflint really doesn't
> like some of the mips specific issues. We really should import the Debian
> mips backend, I am sorry I haven't found time to do all the needed
> research.

So at least one of the mips problems is that the current patch
just does:
RELOC_TYPE (NONE,               0)
RELOC_TYPE (16,                 0)
RELOC_TYPE (32,                 0)
RELOC_TYPE (REL32,              0)
RELOC_TYPE (26,                 0)
RELOC_TYPE (HI16,               0)
RELOC_TYPE (LO16,               0)
[...]


Kurt

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

* Re: Some Debian elfutils issues
@ 2016-01-13 23:22 Kurt Roeckx
  0 siblings, 0 replies; 6+ messages in thread
From: Kurt Roeckx @ 2016-01-13 23:22 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

On Wed, Jan 13, 2016 at 11:13:28PM +0100, Mark Wielaard wrote:
> Hi Kurt,
> 
> Thanks for the Debian builds of elfutils-0.165. Sorry for the breakage,
> wrt old glibc elf.h system header. But happy to see the simple fix seems
> to work.
> 
> I looked at the latest build logs:
> https://buildd.debian.org/status/package.php?p=elfutils
> 
> For the hppa failure we need some hppa hacker to explain whether or not
> this is a real issue or not:
> 
> elflint /<<PKGBUILDDIR>>/tests/elfstrmerge
> section [24] '.plt' is both executable and writable
> FAIL run-strip-strmerge.sh (exit status: 1)
> 
> Normaly elflint is correct, this would be a bad thing.

I think that has come up before in the past.

> For the kFreeBSD variants you could start with the second patch to
> elflint to at least recognize ELFOSABI_FREEBSD. Although I suspect there
> might be more issues. But maybe we are lucky and it really is just like
> normal GNU/Linux ELF files since you are using the normal GNU toolchain.

It has always worked without problems.

> If you could try the attached patches on a new Debian build that would
> be appreciated.

I'll try it tomorrow or in the weekend.


Kurt

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

* Some Debian elfutils issues
@ 2016-01-13 22:13 Mark Wielaard
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wielaard @ 2016-01-13 22:13 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

Hi Kurt,

Thanks for the Debian builds of elfutils-0.165. Sorry for the breakage,
wrt old glibc elf.h system header. But happy to see the simple fix seems
to work.

I looked at the latest build logs:
https://buildd.debian.org/status/package.php?p=elfutils

For the hppa failure we need some hppa hacker to explain whether or not
this is a real issue or not:

elflint /<<PKGBUILDDIR>>/tests/elfstrmerge
section [24] '.plt' is both executable and writable
FAIL run-strip-strmerge.sh (exit status: 1)

Normaly elflint is correct, this would be a bad thing.

The hurd test build issue should be easy to fix with the attached patch.

For the kFreeBSD variants you could start with the second patch to
elflint to at least recognize ELFOSABI_FREEBSD. Although I suspect there
might be more issues. But maybe we are lucky and it really is just like
normal GNU/Linux ELF files since you are using the normal GNU toolchain.

The other issue on kFreeBSD is that we try to run a test that uses the
linux specific dwfl_linux_proc_attach. We should just skip that on none
GNU/Linux platforms like the third attached patch does.

The mips failures are a bit harder to fix since elflint really doesn't
like some of the mips specific issues. We really should import the Debian
mips backend, I am sorry I haven't found time to do all the needed
research.

If you could try the attached patches on a new Debian build that would
be appreciated.

Thanks,

Mark

[-- Attachment #2: 0001-tests-Guard-linux-specific-header-includes-with-ifde.patch --]
[-- Type: text/plain, Size: 1191 bytes --]

From 6bf03d4a3f2badac3d353d376501574204688c0f Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 13 Jan 2016 22:49:02 +0100
Subject: [PATCH] tests: Guard linux specific header includes with ifdef
 __linux__.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 tests/ChangeLog          | 4 ++++
 tests/dwfl-proc-attach.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 366aea9..3900d1b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-13  Mark Wielaard  <mjw@redhat.com>
+
+	* dwfl-proc-attach.c: Guard linux specific header.
+
 2016-01-08  Mark Wielaard  <mjw@redhat.com>
 
 	* elfputzdata.c (main): Fix parentheses in strncmp test.
diff --git a/tests/dwfl-proc-attach.c b/tests/dwfl-proc-attach.c
index 0ba0be2..e7bb201 100644
--- a/tests/dwfl-proc-attach.c
+++ b/tests/dwfl-proc-attach.c
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <error.h>
 #include <unistd.h>
+#ifdef __linux__
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/user.h>
@@ -29,6 +30,7 @@
 #include <string.h>
 #include ELFUTILS_HEADER(dwfl)
 #include <pthread.h>
+#endif
 
 #ifndef __linux__
 int
-- 
2.5.0


[-- Attachment #3: 0001-elflint-Recognize-ELFOSABI_FREEBSD-which-Debian-kFre.patch --]
[-- Type: text/plain, Size: 1593 bytes --]

From 866aaf612c028853e160161ee3ca4d6704d22bef Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 13 Jan 2016 22:57:03 +0100
Subject: [PATCH] elflint: Recognize ELFOSABI_FREEBSD which Debian kFreeBSD
 uses.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 src/ChangeLog | 4 ++++
 src/elflint.c | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index af98c4d..707c271 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-13  Mark Wielaard  <mjw@redhat.com>
+
+	* elflint.c (check_elf_header): Recognize ELFOSABI_FREEBSD.
+
 2016-01-08  Mark Wielaard  <mjw@redhat.com>
 
 	* elfcompress.c (compress_section): Use %zu to print size_t.
diff --git a/src/elflint.c b/src/elflint.c
index 7a7b9ce..eae7761 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -380,9 +380,11 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
     ERROR (gettext ("unknown ELF header version number e_ident[%d] == %d\n"),
 	   EI_VERSION, ehdr->e_ident[EI_VERSION]);
 
-  /* We currently don't handle any OS ABIs other than Linux.  */
+  /* We currently don't handle any OS ABIs other than Linux and the
+     kFreeBSD variant of Debian.  */
   if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE
-      && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+      && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX
+      && ehdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD)
     ERROR (gettext ("unsupported OS ABI e_ident[%d] == '%s'\n"),
 	   EI_OSABI,
 	   ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf)));
-- 
2.5.0


[-- Attachment #4: 0001-tests-Skip-dwfl-bug-fd-leak-test-if-dwfl_linux_proc_.patch --]
[-- Type: text/plain, Size: 1277 bytes --]

From 1dfe8770f682534605d9eda7749afb86bd528165 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 13 Jan 2016 23:06:33 +0100
Subject: [PATCH] tests: Skip dwfl-bug-fd-leak test if dwfl_linux_proc_report
 is unsupported.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 tests/ChangeLog          |  4 ++++
 tests/dwfl-bug-fd-leak.c | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 3900d1b..7deb3e6 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
 2016-01-13  Mark Wielaard  <mjw@redhat.com>
 
+	* dwfl-bug-fd-leak.c: Skip test unless on __linux__.
+
+2016-01-13  Mark Wielaard  <mjw@redhat.com>
+
 	* dwfl-proc-attach.c: Guard linux specific header.
 
 2016-01-08  Mark Wielaard  <mjw@redhat.com>
diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
index bcbfb29..689cdd7 100644
--- a/tests/dwfl-bug-fd-leak.c
+++ b/tests/dwfl-bug-fd-leak.c
@@ -27,6 +27,15 @@
 #include <error.h>
 #include <unistd.h>
 #include <dwarf.h>
+
+#ifndef __linux__
+int
+main (void)
+{
+  return 77; /* dwfl_linux_proc_report is linux specific.  */
+}
+#else
+
 #include <sys/resource.h>
 #include ELFUTILS_HEADER(dwfl)
 
@@ -104,3 +113,4 @@ main (void)
 
   return 0;
 }
+#endif
-- 
2.5.0


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

end of thread, other threads:[~2016-01-19  3:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19  3:33 Some Debian elfutils issues Kurt Roeckx
  -- strict thread matches above, loose matches on Subject: below --
2016-01-18 16:37 Jose E. Marchesi
2016-01-18 14:35 Mark Wielaard
2016-01-13 23:40 Kurt Roeckx
2016-01-13 23:22 Kurt Roeckx
2016-01-13 22:13 Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).