* b4: shazam: UnboundLocalError
@ 2025-09-30 12:18 Marc Kleine-Budde
2025-09-30 12:58 ` Konstantin Ryabitsev
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2025-09-30 12:18 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: users, tools, kernel
[-- Attachment #1: Type: text/plain, Size: 2543 bytes --]
Hello,
current b4 master crashes like this during shazam ("am" works though):
| $ b4 shazam 20250930-gs-usb-max-if-v5-1-863330bf6666@coelacanthus.name
| Grabbing thread from lore.kernel.org/all/20250930-gs-usb-max-if-v5-1-863330bf6666@coelacanthus.name/t.mbox.gz
| Checking for newer revisions
| Grabbing search results from lore.kernel.org
| Analyzing 8 messages in the thread
| Analyzing 1 code-review messages
| Traceback (most recent call last):
| File "/home/frogger/local/git/b4/src/b4/command.py", line 450, in <module>
| cmd()
| ~~~^^
| File "/home/frogger/local/git/b4/src/b4/command.py", line 433, in cmd
| cmdargs.func(cmdargs)
| ~~~~~~~~~~~~^^^^^^^^^
| File "/home/frogger/local/git/b4/src/b4/command.py", line 105, in cmd_shazam
| b4.mbox.main(cmdargs)
| ~~~~~~~~~~~~^^^^^^^^^
| File "/home/frogger/local/git/b4/src/b4/mbox.py", line 854, in main
| make_am(msgs, cmdargs, msgid)
| ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
| File "/home/frogger/local/git/b4/src/b4/mbox.py", line 113, in make_am
| lser = lmbx.get_series(revision=wantver, sloppytrailers=cmdargs.sloppytrailers, reroll=reroll,
| codereview_trailers=load_codereview)
| File "/home/frogger/local/git/b4/src/b4/__init__.py", line 362, in get_series
| if pmsg is None:
| ^^^^
| UnboundLocalError: cannot access local variable 'pmsg' where it is not associated with a value
| $ b4 --version
| 0.15-dev-56183
I've bisected the problem to:
| 8633c7e830a5a75b6e34593cda98d0b6c0b1bb05 is the first bad commit
| commit 8633c7e830a5a75b6e34593cda98d0b6c0b1bb05
| Author: Tamir Duberstein <tamird@gmail.com>
| Date: Fri Jun 6 15:51:19 2025 -0400
|
| Check variables for None rather than exprs
|
| This allows type checkers to better understand that these variables
| can't be None.
|
| Signed-off-by: Tamir Duberstein <tamird@gmail.com>
| Link: https://patch.msgid.link/20250606-uv-compat-v1-8-c76c1c8d6eeb@gmail.com
| Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
| src/b4/__init__.py | 21 ++++++++++++---------
| 1 file changed, 12 insertions(+), 9 deletions(-)
| $ python3 --version
| Python 3.13.7
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: b4: shazam: UnboundLocalError
2025-09-30 12:18 b4: shazam: UnboundLocalError Marc Kleine-Budde
@ 2025-09-30 12:58 ` Konstantin Ryabitsev
2025-09-30 13:00 ` Bugspray Bot
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Konstantin Ryabitsev @ 2025-09-30 12:58 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: users, tools, kernel
On Tue, Sep 30, 2025 at 02:18:48PM +0200, Marc Kleine-Budde wrote:
> Hello,
>
> current b4 master crashes like this during shazam ("am" works though):
Thank you, confirmed.
bugspray tag me
-K
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: b4: shazam: UnboundLocalError
2025-09-30 12:18 b4: shazam: UnboundLocalError Marc Kleine-Budde
2025-09-30 12:58 ` Konstantin Ryabitsev
@ 2025-09-30 13:00 ` Bugspray Bot
2025-09-30 13:10 ` Bugspray Bot
2025-09-30 13:26 ` Rob Herring
3 siblings, 0 replies; 7+ messages in thread
From: Bugspray Bot @ 2025-09-30 13:00 UTC (permalink / raw)
To: kernel, mkl, tools, tools, users, konstantin
Hello:
This conversation is now tracked by Kernel.org Bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=220612
There is no need to do anything else, just keep talking.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: b4: shazam: UnboundLocalError
2025-09-30 12:18 b4: shazam: UnboundLocalError Marc Kleine-Budde
2025-09-30 12:58 ` Konstantin Ryabitsev
2025-09-30 13:00 ` Bugspray Bot
@ 2025-09-30 13:10 ` Bugspray Bot
2025-09-30 13:24 ` Marc Kleine-Budde
2025-09-30 13:26 ` Rob Herring
3 siblings, 1 reply; 7+ messages in thread
From: Bugspray Bot @ 2025-09-30 13:10 UTC (permalink / raw)
To: tools, mkl, konstantin, tools, users, kernel
Konstantin Ryabitsev writes in commit 2354af10a8e8db91806377f8ef6ea3770e43b0dc:
fix: ensure pmsg is defined before the check
Ensure that pmsg is set as None before we check for it to avoid a crash.
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220612
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
(via https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=2354af10a8e8)
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: b4: shazam: UnboundLocalError
2025-09-30 13:10 ` Bugspray Bot
@ 2025-09-30 13:24 ` Marc Kleine-Budde
0 siblings, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2025-09-30 13:24 UTC (permalink / raw)
To: Bugspray Bot; +Cc: tools, konstantin, tools, users, kernel
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On 30.09.2025 13:10:24, Bugspray Bot wrote:
> Konstantin Ryabitsev writes in commit 2354af10a8e8db91806377f8ef6ea3770e43b0dc:
>
> fix: ensure pmsg is defined before the check
>
> Ensure that pmsg is set as None before we check for it to avoid a crash.
>
> Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220612
> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
>
> (via https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=2354af10a8e8)
Work for me!
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: b4: shazam: UnboundLocalError
2025-09-30 12:18 b4: shazam: UnboundLocalError Marc Kleine-Budde
` (2 preceding siblings ...)
2025-09-30 13:10 ` Bugspray Bot
@ 2025-09-30 13:26 ` Rob Herring
2025-09-30 14:34 ` Konstantin Ryabitsev
3 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2025-09-30 13:26 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: Konstantin Ryabitsev, users, tools, kernel
On Tue, Sep 30, 2025 at 7:18 AM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>
> Hello,
>
> current b4 master crashes like this during shazam ("am" works though):
>
> | $ b4 shazam 20250930-gs-usb-max-if-v5-1-863330bf6666@coelacanthus.name
> | Grabbing thread from lore.kernel.org/all/20250930-gs-usb-max-if-v5-1-863330bf6666@coelacanthus.name/t.mbox.gz
> | Checking for newer revisions
> | Grabbing search results from lore.kernel.org
> | Analyzing 8 messages in the thread
> | Analyzing 1 code-review messages
> | Traceback (most recent call last):
> | File "/home/frogger/local/git/b4/src/b4/command.py", line 450, in <module>
> | cmd()
> | ~~~^^
> | File "/home/frogger/local/git/b4/src/b4/command.py", line 433, in cmd
> | cmdargs.func(cmdargs)
> | ~~~~~~~~~~~~^^^^^^^^^
> | File "/home/frogger/local/git/b4/src/b4/command.py", line 105, in cmd_shazam
> | b4.mbox.main(cmdargs)
> | ~~~~~~~~~~~~^^^^^^^^^
> | File "/home/frogger/local/git/b4/src/b4/mbox.py", line 854, in main
> | make_am(msgs, cmdargs, msgid)
> | ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
> | File "/home/frogger/local/git/b4/src/b4/mbox.py", line 113, in make_am
> | lser = lmbx.get_series(revision=wantver, sloppytrailers=cmdargs.sloppytrailers, reroll=reroll,
> | codereview_trailers=load_codereview)
> | File "/home/frogger/local/git/b4/src/b4/__init__.py", line 362, in get_series
> | if pmsg is None:
> | ^^^^
> | UnboundLocalError: cannot access local variable 'pmsg' where it is not associated with a value
I sent a fix for this 2.5 months ago: "mbox: Fix splat in get_series()"
Is sending to tools@kernel.org not sufficient?
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-09-30 14:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-30 12:18 b4: shazam: UnboundLocalError Marc Kleine-Budde
2025-09-30 12:58 ` Konstantin Ryabitsev
2025-09-30 13:00 ` Bugspray Bot
2025-09-30 13:10 ` Bugspray Bot
2025-09-30 13:24 ` Marc Kleine-Budde
2025-09-30 13:26 ` Rob Herring
2025-09-30 14:34 ` Konstantin Ryabitsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox