Linux

Problem: The repository ‘http://de.archive.ubuntu.com/ubuntu impish Release’ no longer has a Release file.

Written by  on January 31, 2023

Solution:
sudo sed -i 's/impish/jammy/g' /etc/apt/sources.list
sudo apt update && sudo apt full-upgrade

Manjaro Linux: “Account locked due to three failed login attempts..”

Written by  on November 24, 2022

So annoying ..
Edit /etc/security/faillock.conf with sudo and add deny = 0.

ssh: unable to negotiate – not matching host key type found

Written by  on July 1, 2022

problem:
Unable to negotiate with 192.168.100.73 port 22: no matching host key type found. Their offer: ssh-rsa

more details:
ssh -vvv root@192.168.100.73

then fix by saying which type to use:
ssh -vvv -oHostKeyAlgorithms=+ssh-rsa root@192.168.100.73

Else adapt the config. See https://askubuntu.com/questions/836048/ssh-returns-no-matching-host-key-type-found-their-offer-ssh-dss

————

edit: since there was still a problem with deploying binaries to the target (embedded device), I’ve edited the ssh-config:

cat > ~/.ssh/config
Paste
Host 192.168.100.*
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

Enter + CTRL+C, done :

Fresh Raspberry Pi 400, but package-manager ‘dead’

Written by  on March 10, 2022

It’s never early enough to inspire, so my firstborn got two days ago her first own computer. I don’t want that she grows comfortable with touching a smartphone, but not knowing what happens in the “back”, so she got a Raspberry Pi 400.
I did not expect that the red-white color-combination of the keyboard-like module with it’s raspberry-button will spark so much joy!
The first evening we unwrapped everything and she put all cables in and we booted it right from the preconfigured sd-card. Nice, very comfortable.

Problem:
Then I wanted to run ‘apt-get’ to fix the updates and maybe install a paint-like program ..

Error
Repository ‘http://deb.debian.org/debian buster-updates InRelease’ changed its ‘Suite’ value from ‘stable-updates’ to ‘oldstable-updates’

So neither apt-get update or any of the first tips I checked, worked. Until I found this:
sudo apt-get update --allow-releaseinfo-change

Problem solved, but – would a newcomer or young person be able to fix this?
I doubt it. This isn’t really user-friendly ..

edit:
Anyway: Since update of the distribution from ‘buster’ to ‘bullseye’ by editing two package lists did not really go well, I’ve deployed a ‘real’ bullseye-image onto the sd-card and we fixed the rest of the configuration in minutes 🙂

žžžžžž

Written by  on April 29, 2021

Two family members names sport a nice z with Caron: ž.
Win 10: ALT+0158 (number pad with numlock on)
Linux (unicode): CTRL+SHIFT+U+017E

64 GiB USB 3.1 stick and VM problems

Written by  on March 31, 2021

Got a new 64 GiB USB3.1 stick (Samsung) and that’s where the problems started..
It was formatted with exFAT, one partition, which was not mountable for an embedded Linux.
So I tried to to use Windows standard tools (neither via explorer nor via powershell) to create a FAT32-partition of smaller than 32 GiB size. Did not work.

Second thought: let’s do this inside the Kubuntu-VM!
* media was not shown -> fixable by installing the extension pack (else just USB 1.1), then adding in the VM-settings a USB3.0-filter for the respective device, then fire up the VM and activate it in the “virtualbox-bar > devices”.
* check with ‘lsblk’ if there is a new block based device
* format with ‘gparted’ if necessary: one primary partition of 20 GiB FAT32 and the rest ext4 worked like a charm for me (of course, windows can’t handle ext4 ..). Gparted is really a lifesaver, been using this for a decade now.
* mount with ‘sudo mount /dev/sbd1 ~/Desktop/usbsticky’ if OS does not support some auto-mount on plugging-in

tutorial: heob (heap profiler; memory leak analysis)

Written by  on June 17, 2020

Heob is an OSS project, short for ‘heap observer’.

How to configure and use?
0. The official documentation from Qt/QtCreator is – like always :’D – a bit sparse: https://doc.qt.io/qtcreator/creator-heob.html
1. Get it from: https://github.com/ssbssa/heob/releases (I’ll use here release 3.1 from July 2019) and extract to the directory of your choice. This directory has to be set later as configuration path.
If you use gcc/mingw, then make sure you’ve dwarf-stack enabled. Since I’m just using the MSVC, not much had to be done.
2. Inside QtCreator (I am using right now 4.12 from the Maintenance Installer) go to “Analyze > Heob” and configure it like this:

The floppydisk-icon can be saved to store ONE configuration.
I leave most of the time the tracing to simple, else time-critical processes can fail. The output-files should be named if you do several runs, which you want to compare or post-process. Most of the time it makes sense to start disabled, because else heob tracks already all the losses at start and this will delay the start.
3. As example, I’ve set Cullendula as UUT (unit under test).

Since heob was started disabled, the leak recording is off: Activate it by pressing ‘n’. If you resize the terminal, the last line can become invisible due to some glitch. So better leave the size of the window untouched!
4. Do your favorite workflow in the UUT. Then close/quit the UUT.
5. Depending on how much allocations were done, heob takes more (up to ten minutes!) or less time (seconds in the case of Cullendula) to evaluate the leaks.

The results are sorted in descending order. Expand the entries to check the stack-trace of the cause.
Some can be triggered by leaks in the underlying libraries (Qt .. I am lookin at you: https://bugreports.qt.io/browse/QTBUG-59621), some by your own buggy implementation.

Hint: the generated xml-report can be later loaded again in the results-tab. Or specify “-o leaks20200617.html” for an optically more pleasing result.

SSH/SCP quick help

Written by  on October 17, 2019

Challenge was to reconfigure a device, which has a Linux running on a TQ-board. Some files had to be adjusted.

Connect to the device:

(Then enter password.)

List amount of free space:

Show target of symlink:

Retrospective view at 2018

Written by  on February 1, 2019

The first month of 2019 already passed. And we passed it with flying colors!
But let’s have a look at 2018 – a year full of challenges and success: I’ve worked full-time, organized and participated in advanced courses for Python and in Requirements Engineering (officially: IREB Requirements Engineering Foundation Level-approved) and pursued a new employment as software engineer.

And I wrote some software in my spare-time, as you can see in the graph for the public github-repositories. The gaps in the commits can be explained with the birth of my daughter and the time where I acquired the new job and moved nearly 900 km across the country. Yay! Nice personal projects were and are Cullendula and the Daily Coding Challenges, which I solve mostly with fully Unit-tested Python (3).

More new, hands-on knowledge was gained in the area of CMake and Qt-charts.
Well – 2018 was great. Let me make 2019 greater! 💪

Pick a random reviewer

Written by  on January 30, 2019

Most teams have a certain code-review-process. But most of the time there is no “round robin”-implementation who will be the reviewer, but the coder itself should select the reviewer. Because of domain-knowledge, etc. And then you her lots of times “I am currently busy. Not me!”

Solution: random and fair selection via bash.

Current version of the script can be found at: https://github.com/marcelpetrick/bashCollection/blob/master/randomReviewer.sh

Inspired by a stack-overflow answer.