GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111178: Fix getsockaddrarg() undefined behavior by vstinner · Pull Request #131668 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Mar 24, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Don't pass direct references to sockaddr members since their type may not match PyArg_ParseTuple() types. Instead, use temporary 'int' and 'unsigned char' variables, and update sockaddr members afterwards.

  • Issue: UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-111178: Fix getsockaddrarg() undefined behavior
88fc5c2
Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.
@vstinner vstinner added the skip news label Mar 24, 2025
@bedevere-app bedevere-app Bot added the awaiting core review label Mar 24, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Mar 24, 2025
UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178
Closed
@vstinner

vstinner commented Mar 24, 2025

Copy link
Copy Markdown
Member Author

Fix the following error:

$ ./python -m test -v test_socket 
== CPython 3.14.0a6+ (heads/main:4596666a9f9, Mar 24 2025, 14:50:29) [Clang 19.1.7 (Fedora 19.1.7-2.fc41)]
== Linux-6.13.4-200.fc41.x86_64-x86_64-with-glibc2.40 little-endian
== Python build: release UBSAN
(...)
0:00:00 load avg: 3.93 [1/1] test_socket
testBindBrEdrL2capSocket (test.test_socket.BasicBluetoothTest.testBindBrEdrL2capSocket) ...

Python/getargs.c:705:13: runtime error: store to misaligned address 0x7ffc1837d0f2 for type 'int', which requires 4 byte alignment
0x7ffc1837d0f2: note: pointer points here
 00 00  1f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  d0 d0 37 18 fc 7f 00 00  90 a6 90 01 00 00
              ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Python/getargs.c:705:13 
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Mar 24, 2025

Copy link
Copy Markdown
Member Author

@picnixz: This change looks like a bugfix, do you think that it should be backported to 3.12 and 3.13 branches?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz reviewed Mar 24, 2025
View reviewed changes

@picnixz picnixz left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are BTPROTO_RFCOMM and BTPROTO_HCI for non-NetBSD below also suffering from the same issue? And yes, it is a bugfix IMO even if the function is internal.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Modules/socketmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

vstinner added 2 commits March 24, 2025 15:28
@vstinner
Simplify code
1aebf4c
@vstinner
Initialize cid to 0
9eb932c
@vstinner

vstinner commented Mar 24, 2025

Copy link
Copy Markdown
Member Author

Are BTPROTO_RFCOMM and BTPROTO_HCI for non-NetBSD below also suffering from the same issue?

I didn't get UBsan warning/error on this code, so I prefer to leave it unchanged.

And yes, it is a bugfix IMO even if the function is internal.

This function is called by sock.bind(), sock.connect() and sock.sendto() for example.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Mar 24, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I didn't get UBsan warning/error on this code, so I prefer to leave it unchanged.

At compile time I don't think there will be but at runtime it might be because the tests are not covering the calls

This function is called by sock.bind(), sock.connect() and sock.sendto() for example.

By internal I meant it's not documented (but yes it's called by many other functions)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Mar 24, 2025
@vstinner

vstinner commented Mar 24, 2025

Copy link
Copy Markdown
Member Author

At compile time I don't think there will be but at runtime it might be because the tests are not covering the calls

I added abort() in BTPROTO_RFCOMM and BTPROTO_HCI code paths and ran test_socket. Sadly, test_socket pass with my change, which means that these two code paths are not tested by test_socket.

If it's not tested, I don't feel comfortable to modify these code paths.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Mar 24, 2025

Copy link
Copy Markdown
Member Author

On Linux, the sockaddr_l2 structure is defined as:

struct sockaddr_l2 {
	sa_family_t	l2_family;
	unsigned short	l2_psm;
	bdaddr_t	l2_bdaddr;
	unsigned short	l2_cid;
	uint8_t		l2_bdaddr_type;
};

l2_psm and l2_cid members are unsigned. So I'm not sure if my change is correct.

cc @serhiy-storchaka

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka

serhiy-storchaka commented Mar 24, 2025

Copy link
Copy Markdown
Member

On common platforms int covers ranges of unsigned short, so the correct code should work. But will not there be a compiler warning when int is implicitly converted to unsigned short? So maybe use unsigned short for psm? In any case, this code is Linux-only, because on FreeBSD and NetBSD there are no cid and bdaddr_type fields.

I afraid that there is a similar error for BTPROTO_RFCOMM: on Linux, FreeBSD and NetBSD the channel field has type uint8_t, not int.

https://man.archlinux.org/man/l2cap.7.en
https://man.freebsd.org/cgi/man.cgi?query=ng_btsocket
https://man.netbsd.org/bluetooth.4

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner added 2 commits March 28, 2025 11:20
@vstinner
Use 'unsigned short' type
533a478
Fix also BTPROTO_RFCOMM and BTPROTO_HCI code path.
@vstinner
Use 'unsigned char'
9968c1e
@vstinner

vstinner commented Mar 28, 2025

Copy link
Copy Markdown
Member Author

I updated my PR to use unsigned short and unsigned char, and I also updated BTPROTO_RFCOMM and BTPROTO_HCI.

@serhiy-storchaka @picnixz: Please review the updated PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
Add NEWS entry
a95b22d
serhiy-storchaka
serhiy-storchaka reviewed Mar 28, 2025
View reviewed changes
Comment thread Modules/socketmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
Use 'unsigned long' to parse channel on Windows
18ed09e
serhiy-storchaka
serhiy-storchaka reviewed Mar 29, 2025
View reviewed changes
Comment thread Modules/socketmodule.c
#else /* __NetBSD__ || __DragonFly__ */
_BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
if (!PyArg_ParseTuple(args, "i", &_BT_HCI_MEMB(addr, dev))) {
unsigned short dev = _BT_HCI_MEMB(addr, dev);

@serhiy-storchaka serhiy-storchaka Mar 29, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is it defined?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@picnixz picnixz Apr 1, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bunch of define at the top of the file:

#if (defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H)) \
     && !defined(__NetBSD__) && !defined(__DragonFly__)
#define USE_BLUETOOTH 1
#if defined(__FreeBSD__)
...
#define _BT_HCI_MEMB(sa, memb) ((sa)->hci_##memb)
...
#elif defined(__NetBSD__) || defined(__DragonFly__) // <- unreachable
... 
#define _BT_HCI_MEMB(sa, memb) ((sa)->bt_##memb)
#else
...
#define _BT_HCI_MEMB(sa, memb) ((sa)->hci_##memb)
...
#endif
#endif

But AFAICT, the elif defined(__NetBSD__) || defined(__DragonFly__) is not possible at all since we're still in the big #if where we want !defined(__NetBSD__) && !defined(__DragonFly__). So indeed, it looks like the macro wouldn't be defined here.

I think we should remove !defined(__NetBSD__) && !defined(__DragonFly__)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@serhiy-storchaka serhiy-storchaka Apr 1, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know about _BT_HCI_MEMB. I asked on what platform the *_dev member is defined, what its name and the structure name. Its turned out that it is hci_node on FreeBSD and NetBSD. hci_dev should exist on Linux.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka serhiy-storchaka added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 29, 2025
@bedevere-bot

bedevere-bot commented Mar 29, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 18ed09e 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131668%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 29, 2025
@vstinner

vstinner commented Mar 29, 2025

Copy link
Copy Markdown
Member Author

Oh no, build fails on FreeBSD:

./Modules/socketmodule.c:2116:28: error: incompatible pointer to integer conversion initializing 'unsigned short' with an expression of type 'char[32]' [-Wint-conversion]
 2116 |             unsigned short dev = _BT_HCI_MEMB(addr, dev);
      |                            ^     ~~~~~~~~~~~~~~~~~~~~~~~
./Modules/socketmodule.c:2122:37: error: array type 'char[32]' is not assignable
 2122 |             _BT_HCI_MEMB(addr, dev) = dev;
      |             ~~~~~~~~~~~~~~~~~~~~~~~ ^

Unrelated failures.

ARM64 Windows PR and ARM64 Windows Non-Debug PR: pythoninfo steps crash with exit code -1073741819.

s390x Fedora Stable Clang PR, s390x RHEL8 PR, s390x RHEL9 PR: test_binary_header() of test_tools.test_msgfmt.CompilationTest failed. I don't know why, but it's unrelated to this change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Mar 29, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

(There's an open PR fixing test_binary_header) #131879

vstinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka

serhiy-storchaka commented Mar 29, 2025

Copy link
Copy Markdown
Member

This is weird, because on FreeBSD the sockaddr_hci structure does not have the hci_dev member, it has the hci_node. But hci_dev is defined as hci_node in this file.

It is not an integer, it is a null-terminated string (size == 32 == NG_NODESIZ == HCI_DEVNAME_SIZE).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
Fix BTPROTO_HCI on FreeBSD
99dcf45
@vstinner
Update BTPROTO_HCI code
c0d7d03
@vstinner

vstinner commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

You need also to make makesockaddr consisting with the parsing code.

Alright, done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka
serhiy-storchaka reviewed Apr 1, 2025
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except that I am not sure about exception types.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Modules/socketmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

vstinner added 3 commits April 1, 2025 15:13
@vstinner
Change exception type to ValueError
7178cfd
@vstinner
Remove outdated comments
94f7b6f
@vstinner
Remove useless assignment
7455bf5
The socket address channel is not initialized before calling
PyArg_ParseTuple().
@vstinner
vstinner enabled auto-merge (squash) April 1, 2025 13:33
@vstinner
vstinner merged commit 8cd29c2 into python:main Apr 1, 2025
@vstinner
vstinner deleted the ubsan_test_socket2 branch April 1, 2025 13:54
@bedevere-app bedevere-app Bot removed the awaiting core review label Apr 1, 2025
@miss-islington-app

miss-islington-app Bot commented Apr 1, 2025

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Apr 1, 2025

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 8cd29c2b533e5a1a262238695d05f2a7c44d6455 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned vstinner Apr 1, 2025
@miss-islington-app

miss-islington-app Bot commented Apr 1, 2025

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 8cd29c2b533e5a1a262238695d05f2a7c44d6455 3.12
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner added a commit to vstinner/cpython that referenced this pull request Apr 1, 2025
@vstinner
pythongh-111178: Fix getsockaddrarg() undefined behavior (python#131668)
ad606fc
Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.

(cherry picked from commit 8cd29c2)
@bedevere-app

bedevere-app Bot commented Apr 1, 2025

Copy link
Copy Markdown

GH-131977 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Apr 1, 2025
@vstinner vstinner removed the needs backport to 3.12 only security fixes label Apr 1, 2025
@vstinner

vstinner commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

Merged, thanks for reviews.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner added a commit that referenced this pull request Apr 1, 2025
@vstinner
[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (#131668) (#…
c318a03
…131977)

gh-111178: Fix getsockaddrarg() undefined behavior (#131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.

(cherry picked from commit 8cd29c2)
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 1, 2025
@vstinner @miss-islington
[3.13] pythongh-111178: Fix getsockaddrarg() undefined behavior (pyth…
a0fefae
…onGH-131668) (pythonGH-131977)

pythongh-111178: Fix getsockaddrarg() undefined behavior (pythonGH-131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.
(cherry picked from commit c318a03)

Co-authored-by: Victor Stinner <[email protected]>
(cherry picked from commit 8cd29c2)
@miss-islington miss-islington mentioned this pull request Apr 1, 2025
[3.12] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (GH-131977) #131979
Merged
@serhiy-storchaka serhiy-storchaka mentioned this pull request Apr 1, 2025
HCI Bluetooth socket bind error on an arm crosscompiled environment #67632
Closed
vstinner added a commit that referenced this pull request Apr 1, 2025
@miss-islington @vstinner
[3.12] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (…
afb3f33
…GH-131977) (#131979)

[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (GH-131977)

gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.
(cherry picked from commit c318a03)

Co-authored-by: Victor Stinner <[email protected]>
(cherry picked from commit 8cd29c2)

Co-authored-by: Victor Stinner <[email protected]>
@serhiy-storchaka serhiy-storchaka mentioned this pull request Apr 1, 2025
Improve/fix FreeBSD Bluetooth socket support #85302
Closed
@serhiy-storchaka

serhiy-storchaka commented Apr 1, 2025

Copy link
Copy Markdown
Member

This PR also fixes #67632 and partially fixes #85302.

vstinner reacted with thumbs up emoji picnixz reacted with rocket emoji
All reactions
  • 👍 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Apr 1, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Clang Installed 3.13 (tier-2) has failed when building commit c318a03.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1387/builds/618) and take a look at the build logs.
  4. Check if the failure is related to this commit (c318a03) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1387/builds/618

Failed tests:

  • test_perf_profiler
  • test_tracemalloc

Failed subtests:

  • test_python_calls_appear_in_the_stack_if_perf_activated - test.test_perf_profiler.TestPerfProfilerWithDwarf.test_python_calls_appear_in_the_stack_if_perf_activated

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/test/test_perf_profiler.py", line 356, in test_python_calls_appear_in_the_stack_if_perf_activated
    self.assertIn(f"py::foo:{script}", stdout)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'py::foo:/tmp/test_python_8ytysh0g/tmp8l6ur2v9/perftest.py' not found in 'python3.13  775038 680530.621812:          1 cycles:Pu: \n\tffffaa282d37fc78 [unknown] ([unknown])\n\tffffaa282d38049c [unknown] ([unknown])\n\tffffaa282bf215e4 [unknown] ([unknown])\n\t    ffff9203cac0 _start+0x0 (/usr/lib/ld-linux-aarch64.so.1)\n\npython3.13  775038 680530.621845:          1 cycles:Pu: \n\t    ffff9203cac0 _start+0x0 (/usr/lib/ld-linux-aarch64.so.1)\n\npython3.13  775038 680530.622063:          1 cycles:Pu: \n\t    ffff9203df40 __fstat+0x0 (inlined)\n\t    ffff9202b70f _dl_sysdep_read_whole_file+0x4f (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff92033a0f _dl_load_cache_lookup+0x127 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff920292c3 _dl_map_object+0x377 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff920245bf openaux+0x3f (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff92023303 _dl_catch_exception+0x63 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff92024b33 _dl_map_object_deps+0x553 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff9203a19f dl_main+0x139f (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff920375ff _dl_sysdep_start+0x1df (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff92038b17 _dl_start_final+0x5ab (inlined)\n\t    ffff92038b17 _dl_start+0x5ab (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff9203cad3 _start+0x13 (/usr/lib/ld-linux-aarch64.so.1)\n\npython3.13  775038 680530.622087:        398 cycles:Pu: \n\tffffaa282d37ff10 [unknown] ([unknown])\n\tffffaa282d3804cc [unknown] ([unknown])\n\tffffaa282bf215e4 [unknown] ([unknown])\n\t    ffff9203e628 __mmap64+0x28 (inlined)\n\t    ffff9203e628 mmap64+0x28 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff9202b75b _dl_sysdep_read_whole_file+0x9b (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff92033a0f _dl_load_cache_lookup+0x127 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff920292c3 _dl_map_
home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5dbdef config_get_locale_encoding+0xf17 (inlined)\n\t          5dbdef config_init_stdio_encoding+0xf17 (inlined)\n\t          5dbdef config_read+0xf17 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5dae33 _PyConfig_Read+0xfe7 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5ef8b3 pyinit_core+0x183 (inlined)\n\t          5ef8b3 Py_InitializeFromConfig+0x183 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61daf7 pymain_init+0x10b (inlined)\n\t          61daf7 pymain_main+0x10b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61dbab Py_BytesMain+0x27 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t    ffff91dd625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffff91dd633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          41daef _start+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\npython3.13  775038 680530.624223:     257882 cycles:Pu: \n\t          5eec04 _Py_HashBytes+0x4 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          536efb unicode_hash+0x5b (inlined)\n\t          536efb hashtable_unicode_hash+0x5b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5d0b87 _Py_hashtable_get_entry_generic+0x23 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5d0f6b _Py_hashtable_get+0xf (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          529083 intern_common+0xe3 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          478ddf descr_new+0x123 (inlined)\n\t          478ddf PyDescr_NewMethod+0x123 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4f3df7 type_add_method+0x33 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4f4963 type_add_methods+0x95b (inlined)\n\t          4f4963 type_ready_fill_dict+0x95b (inlined)\n\t          4f4963 type_ready+0x95b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4f623f init_static_type+0x187 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4c4677 _PyTypes_InitTypes+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f27b7 pycore_init_types+0x23 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f2623 pycore_interp_init+0x12f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f2487 pyinit_config+0x237 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5ef9df pyinit_core+0x2af (inlined)\n\t          5ef9df Py_InitializeFromConfig+0x2af (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61daf7 pymain_init+0x10b (inlined)\n\t          61daf7 pymain_main+0x10b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61dbab Py_BytesMain+0x27 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/targ


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/test/test_perf_profiler.py", line 356, in test_python_calls_appear_in_the_stack_if_perf_activated
    self.assertIn(f"py::foo:{script}", stdout)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'py::foo:/tmp/test_python_4rqy3epg/tmp03c8mvgy/perftest.py' not found in 'python3.13  792251 680597.983070:          1 cycles:Pu: \n\t    ffffa1e6cac0 _start+0x0 (/usr/lib/ld-linux-aarch64.so.1)\n\npython3.13  792251 680597.983090:          1 cycles:Pu: \n\t    ffffa1e6cac0 _start+0x0 (/usr/lib/ld-linux-aarch64.so.1)\n\npython3.13  792251 680597.984079:          1 cycles:Pu: \n\t          41c790 nl_langinfo@plt+0x0 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61a00b _Py_GetLocaleEncoding+0x13 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5dae33 _PyConfig_Read+0xfe7 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5ef8b3 pyinit_core+0x183 (inlined)\n\t          5ef8b3 Py_InitializeFromConfig+0x183 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61daf7 pymain_init+0x10b (inlined)\n\t          61daf7 pymain_main+0x10b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61dbab Py_BytesMain+0x27 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t    ffffa1c0625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffffa1c0633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          41daef _start+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\npython3.13  792251 680597.984100:        433 cycles:Pu: \n\t          41c300 .plt+0x10 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61a00b _Py_GetLocaleEncoding+0x13 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5dae33 _PyConfig_Read+0xfe7 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5ef8b3 pyinit_core+0x183 (inlined)\n\t          5ef8b3 Py_InitializeFromConfig+0x183 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61daf7 pymain_init+0x10b (inlined)\n\t          61daf7 pymain_main+0x10b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61dbab Py_BytesMain+0x27 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t    ffffa1c0625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffffa1c0633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          41daef _start+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedo
n\t          4f623f init_static_type+0x187 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4c4677 _PyTypes_InitTypes+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f27b7 pycore_init_types+0x23 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f2623 pycore_interp_init+0x12f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f2487 pyinit_config+0x237 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5ef9df pyinit_core+0x2af (inlined)\n\t          5ef9df Py_InitializeFromConfig+0x2af (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61daf7 pymain_init+0x10b (inlined)\n\t          61daf7 pymain_main+0x10b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61dbab Py_BytesMain+0x27 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t    ffffa1c0625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffffa1c0633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          41daef _start+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\npython3.13  792251 680597.985139:      48338 cycles:Pu: \n\t          5290b0 Py_INCREF+0x110 (inlined)\n\t          5290b0 _Py_NewRef+0x110 (inlined)\n\t          5290b0 intern_common+0x110 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          47982b descr_new+0x63 (inlined)\n\t          47982b PyDescr_NewWrapper+0x63 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4f4523 add_operators+0x51b (inlined)\n\t          4f4523 type_ready_fill_dict+0x51b (inlined)\n\t          4f4523 type_ready+0x51b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4f623f init_static_type+0x187 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          4c4677 _PyTypes_InitTypes+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f27b7 pycore_init_types+0x23 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f2623 pycore_interp_init+0x12f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5f2487 pyinit_config+0x237 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          5ef9df pyinit_core+0x2af (inlined)\n\t          5ef9df Py_InitializeFromConfig+0x2af (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61daf7 pymain_init+0x10b (inlined)\n\t          61daf7 pymain_main+0x10b (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t          61dbab Py_BytesMain+0x27 (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\t    ffffa1c0625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffffa1c0633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          41daef _start+0x2f (/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/python3.13)\n\npython3.13  792251 680597.986152:     104837 cycles:Pu: \n\t    ffffa1c8588c strncmp+0xe8 (/usr/lib64/libc.so.6)\n\t          4f4ef7 find_signature+0xeef (inlined)\n\t          4f4ef7


Traceback.test_repr) ... ok
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Apr 1, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Refleaks 3.13 (tier-3) has failed when building commit c318a03.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1615/builds/593) and take a look at the build logs.
  4. Check if the failure is related to this commit (c318a03) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1615/builds/593

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 812, in gc_collect
    gc.collect()
ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=2, type=1, proto=0, laddr=('127.0.0.1', 61891)>
Xtest__all__ (test.test_ftplib.MiscTestCase.test__all__) ... ok


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 812, in gc_collect
    gc.collect()
ResourceWarning: unclosed <ssl.SSLSocket fd=6, family=2, type=1, proto=0, laddr=('127.0.0.1', 44424)>
.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-freebsd.refleak/build/Lib/test/test_ftplib.py", line 935, in tearDown
    self.server = None
ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=2, type=1, proto=0, laddr=('127.0.0.1', 62999)>
k
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Apr 4, 2025
sockaddr_hci lacks hci_channel (AF_BLUETOOTH sockets) #70145
Closed
gh-132099: Fix documentation for the BTPROTO_HCI protocol #132118
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments
@picnixz picnixz picnixz left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vstinner vstinner

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@vstinner @picnixz @serhiy-storchaka @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.