bugGNU Octave - Bugs: bug #65088, [octave forge]...

 
 

bug #65088: [octave forge] (instrument-control) UDP packages longer than 1030 bytes cause hang in instrument-control-0.9.1

Submitter:  Ian Stothers <snotters>
Submitted:  Thu 28 Dec 2023 02:53:55 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  lostbard
Originator Name:  snotters Open/Closed:  * Closed
Release:  * 8.3.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 04 Jan 2024 09:45:04 PM UTC, comment #3: 

New version of instrument-control has been released - closing report as fixed

John Donoghue <lostbard>
Group Member
Fri 29 Dec 2023 01:04:33 PM UTC, comment #2: 

I pushed a change that tries to reallocate the input buffer wehn it sees packets bigger than it can handle

https://sourceforge.net/p/octave/instrument-control/ci/d8f4827256778098d36fc9289c95b2d5f801f760/

It will appear in the next release of instrument-control

John Donoghue <lostbard>
Group Member
Thu 28 Dec 2023 09:06:21 PM UTC, comment #1: 

yep - it works only to packets up to 1024 bytes in size as it now buffers the read rather than losing the data

I can change that.


You should probably be using UDPPort now rather than UDP since its been deprecated (although it would also show same behavior currently)

There should probally be some way to configure the size - not sure if there is a limit in matlab ?

John Donoghue <lostbard>
Group Member
Thu 28 Dec 2023 02:53:55 PM UTC, original submission:  

Using GnuOctave v 8.2 with instrument-control-0.8.0 udp packets longer than 1030bytes work fine.

Using GnuOctave v 8.3 or 8.4 with instrument-control-0.9.1 udp packets longer than 1030bytes do not work fine. Packets smaller than 1015 are ok

Sometimes able to ctrl-c out - then next call produces error: udpport_read: Error while reading: 10040 - , sometimes

Some code was introduced at instrument-control-0.9.0 that might be related to the bad behaviour?


--- a/src/udp/udp_class.cc
+++ b/src/udp/udp_class.cc
@@ -108,7 +108,7 @@
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_udp, "octave_udp", "octave_udp");
 
 octave_udp::octave_udp (void)
-: fd(-1), timeout(-1), name(""), fieldnames(9)
+: buffer_len(0), fd(-1), timeout(-1), name(""), fieldnames(9)
 {
   static bool type_registered = false;
 
@@ -232,6 +232,11 @@
       return -1;
     }
 
+  // default size for now
+  input_buffer = new uint8_t[1024];
+  buffer_len = 1024;
+  buffer_pos = 0;
+
   remote_addr.sin_family = AF_INET;
   remote_addr.sin_port = htons(port);
 

Ian Stothers <snotters>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by nrjank (Updated the item)
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by snotters (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-04 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2023-12-29 lostbard Summary[octave forge] (instrument-control) UDP packages longer than 1030 bytes cause hang in istrument-control-0.9.1 [octave forge] (instrument-control) UDP packages longer than 1030 bytes cause hang in instrument-control-0.9.1
    2023-12-29 lostbard StatusConfirmed Ready For Test
    2023-12-29 lostbard StatusNone Confirmed
        Assigned toNone lostbard
        Operating SystemMicrosoft Windows Any
    2023-12-28 nrjank SummaryUDP packages longer than 1030 bytes cause hang in istrument-control-0.9.1 [octave forge] (instrument-control) UDP packages longer than 1030 bytes cause hang in istrument-control-0.9.1
        Carbon-Copy- Added lostbard

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code