boatbod / op25

Fork of osmocom OP25 by boatbod
311 stars 97 forks source link

Errors with Latest Python Version #189

Closed krutzy62 closed 11 months ago

krutzy62 commented 11 months ago

Describe the bug When upgrading the software on Linux Mint 21.1 machine, OP25 crashes with Python issues.

python version detected: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] post_req: error processing input: b'' Traceback (most recent call last): File "/home/ku/op25/op25/gr-op25_repeater/apps/http_server.py", line 71, in post_req data = json.loads(postdata) File "/usr/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

If I go to rebuild OP25 the complier fails with translator error: "lto-wrapper: warning: using serial compilation of 5 LTRANS jobs during RTL pass: final /usr/include/pybind11/detail/internals.h: In function ‘translate_exception’: /usr/include/pybind11/detail/internals.h:386:1: internal compiler error: in ix86_print_operand_address_as, at config/i386/i386.c:13598 386 | } | ^ 0x7f207ef37d8f libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f207ef37e3f libc_start_main_impl ../csu/libc-start.c:392 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See file:///usr/share/doc/gcc-11/README.Bugs for instructions.

To Reproduce Run OP25 or rebuild.

Screenshots N/A

System Information (please complete the following information):

Additional context After I saw the errors I used timeshift to go back to the last known good version. I may not have all the details wanted but I can redo if necessary.

boatbod commented 11 months ago

I'm not quite sure what you've got going on, but I've got doubts that it's related to the python version, or gnuradio version. Since I don't presently have a Linux Mint 21.1 system configured in my virtual environment, I tried a clean build using Ubuntu 22.10 which has python 3.10.7, gnuradio 3.10.3 and gcc 12.2.0 and it compiles, installs and runs with no issue.

If I can find the time I'll install a Mint 21.1, but that's just a Ubuntu derivative so it shouldn't behave an differently.

krutzy62 commented 11 months ago

I am willing to reproduce - but before I do are there specific items I can check and post so I can restore and get back up. I can give you the exact information that way.

boatbod commented 11 months ago

You could attempt to reproduce starting from scratch with a clean system, but I'm actually wondering if there is something in your config that's making the json decode fail.  When I've seen errors like that before it's been related to Unicode vs ASCII; in other words something 8bit got in where we were only expecting 7 bit.

Graham

On 8/5/23 18:43, krutzy62 wrote:

I am willing to reproduce - but before I do are there specific items I can check and post so I can restore and get back up. I can give you the exact information that way.

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM4YUjyUVhLv3KTOpnmIhJrGJ5UF0XhEx-2F1LP4QrWME0o-3Drjq6_U31jt5HgHBh7k3Grc5s4l-2FdJOC7UZC6B1Cl5bujigIcDFkP4FZDmNtym1hMuRKtYn-2Fl5qGk7-2BGrpWbv-2Bk4EfF6FgxoYVhj102Plcz9w7PpTvIKH6OMn3a1N7eapnNlWFFMnmvhk-2FEx8qd9j27bauzUlNsjtRohmU5-2F9TBBHfyIGEIf2DEzWTQ1sSWaaeilFSlLT-2Fp491AyH4se2lyyEq5oBOf0Gy3gIYEttu5PwfgRngjs1d9qLkwJ-2BHGTlNq9mYoNke9FbGFtSYKLqV5hodRfif4POoZmYq0omThL3KiRo-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEd9rWz4Qz8perMXyE8fIDN0GZgHSa4HeIQgGCp-2FABnr0xaMtYkfPeYoLBZLmpM-2FCRA-3D-3DBdaS_U31jt5HgHBh7k3Grc5s4l-2FdJOC7UZC6B1Cl5bujigIcDFkP4FZDmNtym1hMuRKtYn-2Fl5qGk7-2BGrpWbv-2Bk4EfF6FgxoYVhj102Plcz9w7PpTvIKH6OMn3a1N7eapnNlWFRU5vG7zdZqQftFD-2FV-2FYxbUQIbGz4CZVzvRtRv6rZC5M407uWWG2IrTyxf1x6mNVWkUIsrve-2BqE0e1SMNXDrOmeV6z1XAZb0KVpRFy-2BFa-2BAf1ANAJrD8xLyeGbyHwxROwvuX3sdzFDwMzXJ2sAqKAOopjwaxW1TmWg-2BhCkCMZn4U-3D. You are receiving this because you commented.Message ID: @.***>

krutzy62 commented 11 months ago

Let me try it again and get some details. I did see a new version of GCC came out 7/27/2023. Not sure if the update pulled that in or not. I don't think you suggestion would help. I have done a number of "git pull" many times on this PC and if it were what you said I would have run into the problem earlier. Not sure how the config would get screwed up, this micro-PC is dedicated to OP25 and I do nothing else on. It just runs OP25 24/7 using two RTL-SDR's.
Let me dig a little.

krutzy62 commented 11 months ago

Actually I think that might be it. The only way I can show is these attachments.

It wants to update both gcc-11 and gcc-12. I am not programmer in this world so I don't know what gcc-11 and gcc-12 are. It is also updating Python the Python Standard Library Extension. image image

boatbod commented 11 months ago

gcc (and it's sibling gxx) are the C and C++ compiler suite.  Most problems found in pybind11 are usually traced to changes in the compiler.

Graham

On 8/5/23 20:19, krutzy62 wrote:

Actually I think that might be it. The only way I can show is these attachments.

It wants to update both gcc-11 and gcc-12. I am not programmer in this world so I don't know what gcc-11 and gcc-12 are. It is also updating Python the Python Standard Library Extension. image https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlbE7dyg9JfuicWaEE-2F2RAYaAOddDTZy1CNYEaHwkG62Anedf2X0sgBcpNfguB5I-2BaJ3WneLCR614Ip-2BacEIbW7XAITl08ViznJm5DmDUYOfDXauofaXlPMSMjjdMRppw2A-3D-3DsALg_U31jt5HgHBh7k3Grc5s4l-2B4-2FU2Wb-2FWzfKCV1hi4Obfbr4mlsOfhiwU2J4BpPRqsbubc7-2BLp5LGCkZYzbLw1UqwSfNWJbrz3CUDPWU6bPKLlS4frpFtCLjSy3NyxN0yofTrRvs3RDd1K0A64Mfc9x7dV3vLDQputFNztpoPHqRhWICZDBvqGEMZ11iZgPOrY2Hh3VtUKacpKwdee6nRCr5Ev-2FD8-2BvHcl2P7mUB-2B5dH4W0ntJmNs3fOOlXQUw17IPqyRmVVi4bh2IVQXuVp3KBaQ-3D-3D image https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlbE7dyg9JfuicWaEE-2F2RAYaAOddDTZy1CNYEaHwkG62Anedf2X0sgBcpNfguB5I-2BaD1vqy0ofP6O-2B4UN6Df-2BUSnuBZ8vk5u69TJ0bpheAAD9aO-2B8apeFN8fw1tmNmuyhcQ-3D-3DyH-a_U31jt5HgHBh7k3Grc5s4l-2B4-2FU2Wb-2FWzfKCV1hi4Obfbr4mlsOfhiwU2J4BpPRqsbubc7-2BLp5LGCkZYzbLw1UqwSfNWJbrz3CUDPWU6bPKLlS4frpFtCLjSy3NyxN0yofCyQSv4QR73Idfrwg0vjXDolxtAbWV5HLWa6vzYtPONc5qj9SOQB1UQsFBqCOqHzf-2FANJs6M5pfP6-2F63ZO4lOEMRTIi6AY-2FfcbnWA-2FVYiKzMU4J0WH2VvX8UoEWiJcG8YfSr3RxtvdDU4SSTs3TM41Q-3D-3D

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM4YUjyUVhLv3KTOpnmIhJrGTnTMaowZury09x0h68fZM-3DBG9d_U31jt5HgHBh7k3Grc5s4l-2B4-2FU2Wb-2FWzfKCV1hi4Obfbr4mlsOfhiwU2J4BpPRqsbubc7-2BLp5LGCkZYzbLw1UqwSfNWJbrz3CUDPWU6bPKLlS4frpFtCLjSy3NyxN0yof7XCeDhw4AB5Ez4G4ZY97W-2F-2B6vfyP1VRihGQuppmr1x-2Fvd619tkA2dgkSoU1-2F1deFKa7mpDjrMEq1PVhWty4PZVXNP-2FdThqh0Isgz9MFRF34Bmj9y6jM7czbGbAeoDohgaySsK4LJYyutVMQ-2Biu-2Fmzw-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEZeC0csUSyeTvBGwKbS-2B-2BjVY7SgERBZ4oTXsn77n2ukrvJapbGyCX8-2Bg5eMJbEgB7g-3D-3DfM5L_U31jt5HgHBh7k3Grc5s4l-2B4-2FU2Wb-2FWzfKCV1hi4Obfbr4mlsOfhiwU2J4BpPRqsbubc7-2BLp5LGCkZYzbLw1UqwSfNWJbrz3CUDPWU6bPKLlS4frpFtCLjSy3NyxN0yofX74vNAZO8dcAptmODaLIBL9kvDeGVS4IdLeiN8X4w2tTfjff1igm6W1hZApdlnhQi4M-2BED3-2Fbogd67wkyYXXoLtgAChFszREyan-2Fx0MGPTM8QcxpRjbmeHf40XK0B-2BVTvbdJE8vvVKrKA9r-2BlxFlLQ-3D-3D. You are receiving this because you commented.Message ID: @.***>

krutzy62 commented 11 months ago

So I guess I just won't update for a while. I don't know enough to be a helpful to figuring out how to get around it. It looks like a change in the syntax to my old eyes. I am very sorry can't help more.

boatbod commented 11 months ago

I set up a fresh Mint 21.1 system, then built and ran op25 from the gr310 branch with no issue. After that I pulled all the available software updates, deleted the op25/build directory and rebuilt from scratch. Once again it compiled, installed and ran just fine.

Not sure what to recommend other than you apparently have some inconsistency in either your build or your base os. It's probably easier if you just nuke it and start over.

krutzy62 commented 11 months ago

Thanks! I will try later this week when I have time to do it right.

krutzy62 commented 11 months ago

Excuse my ignorant question. But let me give it a go. If I were to delete the build directory then do a "git pull" it will pull everything down so I can rebuild everything. I could see how doing this could pickup new library's so it would compile correctly vs. just updating the new code. What I am trying to avoid is having to backup all my stuff, reinstall Mint, and then doing op25, liquidsoap and icecast2 again. If I could just kill those processes, and rebuild OP25 using the above, and restarting then that wouldn't be a big deal.

boatbod commented 11 months ago

Try this:cd ~/op25/buildsudo make uninstall  (this will error, but do it anyway) cd ~/op25rm -rf build/*./install.shGrahamOn Aug 6, 2023 7:46 PM, krutzy62 @.***> wrote: Excuse my ignorant question. But let me give it a go. If I were to delete the build directory then do a "git pull" it will pull everything down so I can rebuild everything. I could see how doing this could pickup new library's so it would compile correctly vs. just updating the new code. What I am trying to avoid is having to backup all my stuff, reinstall Mint, and then doing op25, liquidsoap and icecast2 again. If I could just kill those processes, and rebuild OP25 using the above, and restarting then that wouldn't be a big deal.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

krutzy62 commented 11 months ago

I will try that tomorrow. That makes total sense. Thank you.

boatbod commented 11 months ago

The other thing you might need to do is make sure you haven't inadvertently attempted to regenerate the bindings as I've found pybind11 to be rather temperamental at best.  After nuking "build" but before you re-runing "install.sh" try this:

cd ~/op25 git checkout .

G.

On 8/6/23 20:19, krutzy62 wrote:

I will try that tomorrow. That makes total sense. Thank you.

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM4YUjyUVhLv3KTOpnmIhJrA133yszJwsx-2BsFoujbEtso-3DI66Y_U31jt5HgHBh7k3Grc5s4l04AU8yjGoq69lQQMcSnoBMTguT3OUpraE2DZ7G99l1vrLQqExs6j5l3MgCZEWTe5EcGHX6m9cC9e6jX-2FItc-2B0lQ6d728n8WFABA2cpeaOQOaZNVU90-2BMQvrU2ltNSLj89UL3m6QpZ8LW3lmISBHVMPLlmkrKrLlUim0u-2BL9CKSWXpysvTpHIx9oX9CJGPi3fYPaBaa6ZCYfv926zDDSzfFBc32NQyoed-2FEZZ910rR0oyz-2FMI9DB0rXnkWu8-2FD2Xnw-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEUHL170aho9xKnJ6LELccsABCBwXcPwJRFxbgrX50UoZCjaMdqNX-2FRN-2BCzMrn0M1jw-3D-3D-4_B_U31jt5HgHBh7k3Grc5s4l04AU8yjGoq69lQQMcSnoBMTguT3OUpraE2DZ7G99l1vrLQqExs6j5l3MgCZEWTe5EcGHX6m9cC9e6jX-2FItc-2B0lQ6d728n8WFABA2cpeaOQO3zJzHqEuzd7cbUQvS6BJloJO9G2ABMI-2BwWkREvgk6PTJpEHRb7J4r7QOJ4e2shoGcxk1IxG6jyUAI4uRiOqNSJzSPjgUQqOd-2B6eaaWNKlIuuRPA0axH3nFnDlrrKt8sCKXT-2Fx9EYhYASzKNXtZQzmA-3D-3D. You are receiving this because you commented.Message ID: @.***>

krutzy62 commented 11 months ago

Thank you for the heads up. I will do that and will report result later today.

krutzy62 commented 11 months ago

Update: Your instructions worked like a champ. Compiled clean and running well. I have save these instructions for future reference. Thank you very much!

boatbod commented 11 months ago

There's a script that's part of the op25 distro which does most of what I suggested.  It's called "rebuild.sh"

G.

On 8/7/23 16:27, krutzy62 wrote:

Update: Your instructions worked like a champ. Compiled clean and running well. I have save these instructions for future reference. Thank you very much!

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM4YUjyUVhLv3KTOpnmIhJrMcc3Xli84zbV1v83eNg2Kg-3DaGmH_U31jt5HgHBh7k3Grc5s4l9T84bQZDBbP19cGi36hABv0Kcmw6EucgcVgU0jr6jJ9yiS3-2Bcpx0iP-2FAHibdgJsdI15K5P77fTwMLd9MZwzqEaXmXqNMl1cENFybS2Z995pKCemAeHn3y5I23-2BJItg2UnY8DwmnB17-2F2coECipjL85Yup5zlhyyYkJ0oOnhCoXpySmfanuegSOm4UCbygTSJLjpEfAFFtbzh1VNSrmtyYruxakNNq29oFyYaB-2BP4EY7MAM18V7DTVNaBBANzbsZ6voh3lxD0OwaYXSj6EX0eB4-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEY8dzaH0yZoMJ00nUoA8Kj8-2BWzQl3VIfH1rZai4pjBrmL2YWqGuhftmkfBWIW-2FkKUA-3D-3D33Mb_U31jt5HgHBh7k3Grc5s4l9T84bQZDBbP19cGi36hABv0Kcmw6EucgcVgU0jr6jJ9yiS3-2Bcpx0iP-2FAHibdgJsdI15K5P77fTwMLd9MZwzqEaXmXqNMl1cENFybS2Z995p-2Bw2LwDvrnju1lhtGjqLhjfOa3C-2B9DmzYOPBRvHyGIRUZMuWr1Qj0brPXSQNgknx2xtr4fepAViXKs8rZpgkR0CB3dhrxTkw89OYhZCdqdoD7GufxOHyNp7AclCBS7MNc9jcpF3-2BZdspwcoAMCdLb7yyuwKzDet0-2BwPj2Cf3raF8-3D. You are receiving this because you commented.Message ID: @.***>