-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dongleman_daemon.py stuck #9
Comments
Hi, dongleman_daemon runs two async tasks at https://github.com/grwlf/asterisk-dongle-setup/blob/master/python/dongleman_daemon.py#L174 and waits for events. In case no events come, it is expected to do nothing. Are you sure that your case is not a desired behavior? |
No, I don't think this is what is expected. Because I check using ussd with the code from asterisk and at such moments the daemon does not redirect the output to telegram, but if the daemon is restarted, the message will come instantly. |
The code doesn't have debug facilities so you probably want to add appropriate The path you might need to check looks like follows:
One moment is bothering me: you are talking about USSD messages. I din't test anything besides SMS and voicecalls, not sure what asterisk does upon receiving USSD. |
Let me try to explain what it looks like. I use this setup on an |
For USSD I've add this to
|
@grwlf |
Interesting. I've reviewed the code and want to say that of cause the
As a consequence, a single problematic file may cause the daemon to stall. Could you please try the latest commit and/or monitor the logs? Exception text should appear in console due to this print |
Ok, I've update the script.
Left the demon to work. But I think the problem is not in the wrong file, the last few days I have been checking if the daemon is working by copying a known correct json file into the queue directory. And when the daemon is stuck, it just does nothing when a new file appears, even inotify does not report that the file was created on the file system. |
It is strange, but with fix from this e055c46 commit the dongleman_daemon running fine for the last two days |
I realized that the reason could be simpler - before the commit the daemon may have raised some unhandled exception leading to its termination. By the commit I now catch all the exceptions so now the daemon should print an error but continue to work. I would be glad if you share some logs to help me figure out what exceptions do you have from it. |
Hello, now I have only these errors and daemon stuck again
After losing the internet connection, the daemon got stuck again. It also does not react to the creation of new files in the queue directory. |
|
OK, that looks like in your case Telethon looses the connection and gives up re-establishing it.. |
I have added some parameters to TelegramClient. Now I don't get connection loss errors, but once after a few days the script stopped without any errors in the console.
|
Makes sense! I'll add this to the code, thanks.
Could it be a segfault from some of the C/C++ libraries involved? Could you please check your system's segfault log? |
@mo3r31337 , could you please share some information on your ARM setup? Do you use RaspberyPi for this? What kind of Nixpkgs/NixOS do you use? I would like to build this project on a smaller device than I use now. |
@grwlf Of course I share info about my setup. The RaspberryPi too huge for this. I use |
PoE is amazing, I think I should try this setup! But am I understand it correctly that you still use nixpkgs on Host for cross-compilation? I mean I think that it should be possible to use Nix for building the .deb package which installs all the dependencies of this project as |
No, I haven't completely used the nixpkg package system to build .deb packages. I used Nixpkg only to generate a json file for dongleman_daemon because I did not quite understand which variable is responsible for what. I tried building with nix on the host machine, but it takes a lot of time and space. Moreover, it is hardly possible to build this setup for arm architecture using nixpkg, I mean that there are some nuances in this process, not all packages were built in a standard way. In total, I spent about two weeks building all the packages, maybe even more. |
Thank you, now I understand. It is not an easy job you are doing, good luck with that! I think that building for arm using nixpgks might be possible. I was able to cross-compile some of the system parts of Pinephone 64, but not the GUI user space. AFAIK compiling mobile GUIs currently requires setting up a virtual machine or a real device, which is indeed a troublesome task. I made some notes about it here https://github.com/grwlf/mobile-nixos-cfg Regarding the Asterisk, I still have plans to run it under Nix on some ARM device, but currently I do not want to use such a tiny computer like yours. I think I will buy a regular Raspberry, but I'd like to test PoE which some of them also support. New modems should arrive to me in January, so I hope to build an arm setup for this project after this time. |
Hello,
I faced with problem that after around in 12hours of idling the dongleman_daemon is hangs and didn't anything until restart daemon. Is it just me or someone else having this problem?
Thank for any advice to help fix this
The text was updated successfully, but these errors were encountered: