diff mbox series

[ovs-dev,2/2] backtrace: Fix 32-bit libunwind build.

Message ID 1570224076-122697-2-git-send-email-u9012063@gmail.com
State Accepted
Delegated to: Ilya Maximets
Headers show
Series [ovs-dev,1/2] travis: Fix 32-bit libunwind system build. | expand

Commit Message

William Tu Oct. 4, 2019, 9:21 p.m. UTC
The libunwind unw_word_t type is defined as uint32_t for 32-bit
system and uint64_t for 64-bit system.  The patch fixes the
compile error using PRIxPTR to print this value.

Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
---
 lib/backtrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Maximets Oct. 7, 2019, 12:06 p.m. UTC | #1
On 04.10.2019 23:21, William Tu wrote:
> The libunwind unw_word_t type is defined as uint32_t for 32-bit
> system and uint64_t for 64-bit system.  The patch fixes the
> compile error using PRIxPTR to print this value.
> 
> Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
> Signed-off-by: William Tu <u9012063@gmail.com>
> Acked-by: Ilya Maximets <i.maximets@ovn.org>
> ---

Thanks! I applied both patches to master, but in the reverse order.

Best regards, Ilya Maximets.
William Tu Oct. 7, 2019, 4:07 p.m. UTC | #2
On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> On 04.10.2019 23:21, William Tu wrote:
> > The libunwind unw_word_t type is defined as uint32_t for 32-bit
> > system and uint64_t for 64-bit system.  The patch fixes the
> > compile error using PRIxPTR to print this value.
> >
> > Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
> > Signed-off-by: William Tu <u9012063@gmail.com>
> > Acked-by: Ilya Maximets <i.maximets@ovn.org>
> > ---
>
> Thanks! I applied both patches to master, but in the reverse order.
>
> Best regards, Ilya Maximets.

Hi Ilya,

Thanks...
Now the cirrus CI and appveyor seem to be failing. I will work on it.

Regards,
William
Ilya Maximets Oct. 7, 2019, 4:11 p.m. UTC | #3
On 07.10.2019 18:07, William Tu wrote:
> On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>>
>> On 04.10.2019 23:21, William Tu wrote:
>>> The libunwind unw_word_t type is defined as uint32_t for 32-bit
>>> system and uint64_t for 64-bit system.  The patch fixes the
>>> compile error using PRIxPTR to print this value.
>>>
>>> Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
>>> Signed-off-by: William Tu <u9012063@gmail.com>
>>> Acked-by: Ilya Maximets <i.maximets@ovn.org>
>>> ---
>>
>> Thanks! I applied both patches to master, but in the reverse order.
>>
>> Best regards, Ilya Maximets.
> 
> Hi Ilya,
> 
> Thanks...
> Now the cirrus CI and appveyor seem to be failing. I will work on it.

Not sure about appveyor, but cirrus is failing because of this:
https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html

It's not related to current patch, freebsd just updated to use gcc > 9.
And it's not possible to build OVS with -Werror and gcc 9 right now.

Best regards, Ilya Maximets.
Ilya Maximets Oct. 7, 2019, 5:10 p.m. UTC | #4
On 07.10.2019 18:11, Ilya Maximets wrote:
> On 07.10.2019 18:07, William Tu wrote:
>> On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>>>
>>> On 04.10.2019 23:21, William Tu wrote:
>>>> The libunwind unw_word_t type is defined as uint32_t for 32-bit
>>>> system and uint64_t for 64-bit system.  The patch fixes the
>>>> compile error using PRIxPTR to print this value.
>>>>
>>>> Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
>>>> Signed-off-by: William Tu <u9012063@gmail.com>
>>>> Acked-by: Ilya Maximets <i.maximets@ovn.org>
>>>> ---
>>>
>>> Thanks! I applied both patches to master, but in the reverse order.
>>>
>>> Best regards, Ilya Maximets.
>>
>> Hi Ilya,
>>
>> Thanks...
>> Now the cirrus CI and appveyor seem to be failing. I will work on it.
> 
> Not sure about appveyor, but cirrus is failing because of this:
> https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html
> 
> It's not related to current patch, freebsd just updated to use gcc > 9.
> And it's not possible to build OVS with -Werror and gcc 9 right now.

And this somehow FreeBSD specific. netinet/icmp6.h from glibc development
package doesn't mark the structure as 'packed' on linux.

Best regards, Ilya Maximets.
William Tu Oct. 8, 2019, 4:13 p.m. UTC | #5
On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote:
> On 07.10.2019 18:11, Ilya Maximets wrote:
> >On 07.10.2019 18:07, William Tu wrote:
> >>On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
> >>>
> >>>On 04.10.2019 23:21, William Tu wrote:
> >>>>The libunwind unw_word_t type is defined as uint32_t for 32-bit
> >>>>system and uint64_t for 64-bit system.  The patch fixes the
> >>>>compile error using PRIxPTR to print this value.
> >>>>
> >>>>Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
> >>>>Signed-off-by: William Tu <u9012063@gmail.com>
> >>>>Acked-by: Ilya Maximets <i.maximets@ovn.org>
> >>>>---
> >>>
> >>>Thanks! I applied both patches to master, but in the reverse order.
> >>>
> >>>Best regards, Ilya Maximets.
> >>
> >>Hi Ilya,
> >>
> >>Thanks...
> >>Now the cirrus CI and appveyor seem to be failing. I will work on it.
> >
> >Not sure about appveyor, but cirrus is failing because of this:
> >https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html
> >
> >It's not related to current patch, freebsd just updated to use gcc > 9.
> >And it's not possible to build OVS with -Werror and gcc 9 right now.
> 
Thanks, I'm reviewing this patch.

> And this somehow FreeBSD specific. netinet/icmp6.h from glibc development
> package doesn't mark the structure as 'packed' on linux.
> 
> Best regards, Ilya Maximets.


The appveyor failure is not due to other issues.

Regards,
William
Ilya Maximets Oct. 8, 2019, 4:33 p.m. UTC | #6
On 08.10.2019 18:13, William Tu wrote:
> On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote:
>> On 07.10.2019 18:11, Ilya Maximets wrote:
>>> On 07.10.2019 18:07, William Tu wrote:
>>>> On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>>>>>
>>>>> On 04.10.2019 23:21, William Tu wrote:
>>>>>> The libunwind unw_word_t type is defined as uint32_t for 32-bit
>>>>>> system and uint64_t for 64-bit system.  The patch fixes the
>>>>>> compile error using PRIxPTR to print this value.
>>>>>>
>>>>>> Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
>>>>>> Signed-off-by: William Tu <u9012063@gmail.com>
>>>>>> Acked-by: Ilya Maximets <i.maximets@ovn.org>
>>>>>> ---
>>>>>
>>>>> Thanks! I applied both patches to master, but in the reverse order.
>>>>>
>>>>> Best regards, Ilya Maximets.
>>>>
>>>> Hi Ilya,
>>>>
>>>> Thanks...
>>>> Now the cirrus CI and appveyor seem to be failing. I will work on it.
>>>
>>> Not sure about appveyor, but cirrus is failing because of this:
>>> https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html
>>>
>>> It's not related to current patch, freebsd just updated to use gcc > 9.
>>> And it's not possible to build OVS with -Werror and gcc 9 right now.
>>
> Thanks, I'm reviewing this patch.
> 
>> And this somehow FreeBSD specific. netinet/icmp6.h from glibc development
>> package doesn't mark the structure as 'packed' on linux.
>>
>> Best regards, Ilya Maximets.
> 
> 
> The appveyor failure is not due to other issues.

appveyor failure is due to missing python3 binary.
Caused by the patch:
1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")

Need to add something like this to the build script:

SET PYTHON="C:\\Python37-x64"
SET PATH="%PYTHON%;%PYTHON%\\Scripts;%PATH%"
python --version

And revert back 's/python3/python/'.

Best regards, Ilya Maximets.
William Tu Oct. 8, 2019, 4:47 p.m. UTC | #7
On Tue, Oct 8, 2019 at 9:33 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> On 08.10.2019 18:13, William Tu wrote:
> > On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote:
> >> On 07.10.2019 18:11, Ilya Maximets wrote:
> >>> On 07.10.2019 18:07, William Tu wrote:
> >>>> On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
> >>>>>
> >>>>> On 04.10.2019 23:21, William Tu wrote:
> >>>>>> The libunwind unw_word_t type is defined as uint32_t for 32-bit
> >>>>>> system and uint64_t for 64-bit system.  The patch fixes the
> >>>>>> compile error using PRIxPTR to print this value.
> >>>>>>
> >>>>>> Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
> >>>>>> Signed-off-by: William Tu <u9012063@gmail.com>
> >>>>>> Acked-by: Ilya Maximets <i.maximets@ovn.org>
> >>>>>> ---
> >>>>>
> >>>>> Thanks! I applied both patches to master, but in the reverse order.
> >>>>>
> >>>>> Best regards, Ilya Maximets.
> >>>>
> >>>> Hi Ilya,
> >>>>
> >>>> Thanks...
> >>>> Now the cirrus CI and appveyor seem to be failing. I will work on it.
> >>>
> >>> Not sure about appveyor, but cirrus is failing because of this:
> >>> https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html
> >>>
> >>> It's not related to current patch, freebsd just updated to use gcc > 9.
> >>> And it's not possible to build OVS with -Werror and gcc 9 right now.
> >>
> > Thanks, I'm reviewing this patch.
> >
> >> And this somehow FreeBSD specific. netinet/icmp6.h from glibc development
> >> package doesn't mark the structure as 'packed' on linux.
> >>
> >> Best regards, Ilya Maximets.
> >
> >
> > The appveyor failure is not due to other issues.
>
> appveyor failure is due to missing python3 binary.
> Caused by the patch:
> 1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")
>
> Need to add something like this to the build script:
>
> SET PYTHON="C:\\Python37-x64"
> SET PATH="%PYTHON%;%PYTHON%\\Scripts;%PATH%"
> python --version
>
> And revert back 's/python3/python/'.
>
> Best regards, Ilya Maximets.

Thanks! I'm testing it.
Also the link to download openssl is no longer available
https://slproweb.com/download/Win32OpenSSL-1_0_2n.exe

I'm testing this one (with 1.0.2t)
https://slproweb.com/download/Win32OpenSSL-1_0_2t.exe
Ben Pfaff Oct. 8, 2019, 5:51 p.m. UTC | #8
On Tue, Oct 08, 2019 at 06:33:10PM +0200, Ilya Maximets wrote:
> On 08.10.2019 18:13, William Tu wrote:
> > On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote:
> > > On 07.10.2019 18:11, Ilya Maximets wrote:
> > > > On 07.10.2019 18:07, William Tu wrote:
> > > > > On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org> wrote:
> > > > > > 
> > > > > > On 04.10.2019 23:21, William Tu wrote:
> > > > > > > The libunwind unw_word_t type is defined as uint32_t for 32-bit
> > > > > > > system and uint64_t for 64-bit system.  The patch fixes the
> > > > > > > compile error using PRIxPTR to print this value.
> > > > > > > 
> > > > > > > Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
> > > > > > > Signed-off-by: William Tu <u9012063@gmail.com>
> > > > > > > Acked-by: Ilya Maximets <i.maximets@ovn.org>
> > > > > > > ---
> > > > > > 
> > > > > > Thanks! I applied both patches to master, but in the reverse order.
> > > > > > 
> > > > > > Best regards, Ilya Maximets.
> > > > > 
> > > > > Hi Ilya,
> > > > > 
> > > > > Thanks...
> > > > > Now the cirrus CI and appveyor seem to be failing. I will work on it.
> > > > 
> > > > Not sure about appveyor, but cirrus is failing because of this:
> > > > https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html
> > > > 
> > > > It's not related to current patch, freebsd just updated to use gcc > 9.
> > > > And it's not possible to build OVS with -Werror and gcc 9 right now.
> > > 
> > Thanks, I'm reviewing this patch.
> > 
> > > And this somehow FreeBSD specific. netinet/icmp6.h from glibc development
> > > package doesn't mark the structure as 'packed' on linux.
> > > 
> > > Best regards, Ilya Maximets.
> > 
> > 
> > The appveyor failure is not due to other issues.
> 
> appveyor failure is due to missing python3 binary.
> Caused by the patch:
> 1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")
> 
> Need to add something like this to the build script:
> 
> SET PYTHON="C:\\Python37-x64"
> SET PATH="%PYTHON%;%PYTHON%\\Scripts;%PATH%"
> python --version
> 
> And revert back 's/python3/python/'.
> 
> Best regards, Ilya Maximets.

It looks like Alin is working on this:
https://github.com/openvswitch/ovs/pull/296
Alin Serdean Oct. 9, 2019, 2:15 p.m. UTC | #9
On 8 Oct 2019, at 20:51, Ben Pfaff <blp@ovn.org<mailto:blp@ovn.org>> wrote:

On Tue, Oct 08, 2019 at 06:33:10PM +0200, Ilya Maximets wrote:
On 08.10.2019 18:13, William Tu wrote:
On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote:
On 07.10.2019 18:11, Ilya Maximets wrote:
On 07.10.2019 18:07, William Tu wrote:
On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets <i.maximets@ovn.org<mailto:i.maximets@ovn.org>> wrote:

On 04.10.2019 23:21, William Tu wrote:
The libunwind unw_word_t type is defined as uint32_t for 32-bit
system and uint64_t for 64-bit system.  The patch fixes the
compile error using PRIxPTR to print this value.

Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
Signed-off-by: William Tu <u9012063@gmail.com<mailto:u9012063@gmail.com>>
Acked-by: Ilya Maximets <i.maximets@ovn.org<mailto:i.maximets@ovn.org>>
---

Thanks! I applied both patches to master, but in the reverse order.

Best regards, Ilya Maximets.

Hi Ilya,

Thanks...
Now the cirrus CI and appveyor seem to be failing. I will work on it.

Not sure about appveyor, but cirrus is failing because of this:
https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/363182.html

It's not related to current patch, freebsd just updated to use gcc > 9.
And it's not possible to build OVS with -Werror and gcc 9 right now.

Thanks, I'm reviewing this patch.

And this somehow FreeBSD specific. netinet/icmp6.h from glibc development
package doesn't mark the structure as 'packed' on linux.

Best regards, Ilya Maximets.


The appveyor failure is not due to other issues.

appveyor failure is due to missing python3 binary.
Caused by the patch:
1ca0323e7c29 ("Require Python 3 and remove support for Python 2.")

Need to add something like this to the build script:

SET PYTHON="C:\\Python37-x64"
SET PATH="%PYTHON%;%PYTHON%\\Scripts;%PATH%"
python --version

And revert back 's/python3/python/'.

Best regards, Ilya Maximets.

It looks like Alin is working on this:
https://github.com/openvswitch/ovs/pull/296

Sorry for the lack of communication on my side.

I sent a patch to update appveyor here: https://patchwork.ozlabs.org/patch/1173786/

Alin.
diff mbox series

Patch

diff --git a/lib/backtrace.c b/lib/backtrace.c
index 9347634487c8..2853d5ff150d 100644
--- a/lib/backtrace.c
+++ b/lib/backtrace.c
@@ -102,7 +102,7 @@  log_received_backtrace(int fd) {
             if (backtrace[i].func[0] == 0) {
                 break;
             }
-            VLOG_WARN("0x%016lx <%s+0x%lx>\n",
+            VLOG_WARN("0x%016"PRIxPTR" <%s+0x%"PRIxPTR">\n",
                       backtrace[i].ip,
                       backtrace[i].func,
                       backtrace[i].offset);