Comments (2)
Looks like the fix has been discovered for this. The sample code below shows a bug which is caused by an operator precedence error (the typedef to "int"). Apparently this code is all over app_rpt and affects all node types. This is not just a chan_voter issue. This will go a long ways towards fixing a major source of long-term instability in app_rpt.
`
#include <stdio.h>
void main()
{
int hours, minutes, seconds;
long long connecttime, connecttime2;
char conntime[64];
int i;
// ORIGINAL CODE:
printf ("Original Code:\n");
connecttime2 = 4294967296L / 2 - 5000L;
for (i = 0; i < 10; i++) {
connecttime = connecttime2;
hours = (int) connecttime/3600000;
connecttime %= 3600000;
minutes = (int) connecttime/60000;
connecttime %= 60000;
seconds = (int) connecttime/1000;
connecttime %= 1000;
snprintf(conntime, 32, "%02d:%02d:%02d.%d", hours, minutes, seconds, (int) connecttime);
conntime[32] = 0;
printf ("time = %s\n", conntime);
connecttime2 += 1000;
}
// FIXED CODE:
printf ("\n\nNew Code:\n");
connecttime2 = 4294967296L / 2 - 5000L;
for (i = 0; i < 10; i++) {
connecttime = connecttime2;
hours = connecttime/3600000L;
connecttime %= 3600000L;
minutes = connecttime/60000L;
connecttime %= 60000L;
seconds = connecttime/1000L;
connecttime %= 1000L;
snprintf(conntime, 32, "%02d:%02d:%02d.%d", hours, minutes, seconds, (int) connecttime);
conntime[32] = 0;
printf ("time = %s\n", conntime);
connecttime2 += 1000L;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
[root@alarmpi tmp]# ./a.out
Original Code:
time = 596:31:18.648
time = 596:31:19.648
time = 596:31:20.648
time = 596:31:21.648
time = 596:31:22.648
time = -596:31:23.648
time = -596:31:24.648
time = -596:31:25.648
time = -596:31:26.648
time = -596:31:27.648
New Code:
time = 596:31:18.648
time = 596:31:19.648
time = 596:31:20.648
time = 596:31:21.648
time = 596:31:22.648
time = 596:31:23.648
time = 596:31:24.648
time = 596:31:25.648
time = 596:31:26.648
time = 596:31:27.648
`
from asterisk.
Over time we've learned that this is issue impacts more than just RTCM the connect time display. Users with other hardware have reported crashes and disconnects occurring around the 600 hour mark. I've seen it with RTCM hardware because that's all I use. But I sense that any two nodes connected to each other on the same server will crash near the 600 hour mark.
from asterisk.
Related Issues (20)
- feature/serial signaling for USB channel drivers HOT 2
- Feature/DCS support HOT 2
- Feature/Kerchunk_Filter HOT 1
- Crashes Related to Connections HOT 6
- feature/update_build_enviorment
- Develop and master branches differ HOT 1
- Exit Behavior
- Feature request: Add MDC1200 and notch filter by default
- custom_audio_filters HOT 5
- APRS server address hardcoded in channel driver HOT 1
- .send_text being called once for every connected echolink node
- feature/update_readme HOT 2
- linkcount error HOT 11
- Add support chan_alsaradio HOT 1
- Wrong echolink number Node in status - EL Android HOT 2
- core dump when many nodes connected HOT 6
- Unload module causes crash HOT 5
- feature/increase_call_list_size HOT 1
- bug/invalid_CD_name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asterisk.