TCP/IP feature or bug?

I have been using the basic TCP VIs (Data Communication palette) to implement multiple independent TCP streams with a real-time system.  In doing some tests, I found a strange behavior that I think may be a "bug".
To form a connection, you need to both run both TCP Listen and TCP Open Connection with the same Service Name.  I assumed that when you closed these two TCP IDs (TCP Close Connection), a subsequent Listen alone, or Open Connection alone, would fail (because both need to be present).  However, I found that while I could not open the Listener a second time without it timing out, I could open the "Open Connection" (without re-opening the Listener) and no error would result.  This should not work (because you could, for example, "Send" via the "Open Connection" stream but not have any process "listening", and capable of receiving, the data).
I've attached a VI that runs the following 6 tests:  1, open/close ("run") server; 2, run client; 3, run server + client; 4, run server+client, then run server+client again; 5, run server+client, then run just server again; 6, run server+client, then run just client again.  According to the principle that both a server and client need to be running at the same time, only tests 3 and 4 should succeed without error (the server is configured with a 2 second timeout, which generates an error if there's no client), but test 6 also succeeds!
Note that the "Is a RefNum" VI on the Boolean palette correctly indicates "Not a RefNum" after the Close Connection VI runs.
P.S. -- this VI was run and tested on LabVIEW 8.5.1.  I just ran it on LabVIEW 8.6, and it behaves the same way (tests 3, 4, and 6 run without error).
Bob Schor
Attachments:
TEST TCP Open and Close.vi ‏46 KB

I don't know all the internal TCP details (e.g. SYN and ACK) and who's supposed to send what and when. I'm assuming that the LabVIEW primitives follow it correctly.
I should also point out that my claim earlier about the listen VI creating multiple listeners was wrong. I simply hadn't looked inside the IA VI, although I have done it in the past. Looking at it shows clearly that it has its own buffer for the listener references and only holds one for each port (makes sense, since you can't have two connections on the same port). Assuming that the primitives work correctly (which they probably do, or there would probably be a single primitive for listening instead of two), then I guess that NI does need to output the listener ref as you suggested, so that the user can disable the listener if they so choose.
By the way, this was simply a pet annoyance of mine, since I was asked to debug a piece of code which was affected by this issue and it was annoying. Essentially, the system had a single client with multiple servers and each server would only allow one connection. The server code looked something like this:
The client code had a similar timer for handling the errors, but it had a much shorter timeout, so what was happening was that if the user closed the client and reopened it while the server was still in the right loop, they would get stuck in a situation where the client opened the connection successfully but didn't get a response so it kept opening more connections. The server, on the other hand, got a connection each time (since the listener was always active) and a single message which was very stale. Then, it had to count all the errors again.
Of course, once I realized this was the issue, the fix was simple. I created and destroyed the listener myself and that solved that. I could also probably have used an infinite timeout instead of the loop, but fixing it was enough. I didn't need to make it any better.
Try to take over the world!
Attachments:
TCP Listen Example.png ‏5 KB

Similar Messages

  • Bug Report: Feature Request/Bug Report Form

    Re: Feature Request/Bug Report Form
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    The Feature Request/Bug Report Form does not include a drop-down option for Creative Cloud.

    Hi Stephen,
    We are collecting feature requests as idea threads here on the forums versus using that form. If you believe you have discovered a bug with Creative Cloud please post about it here on the forums.
    Thanks,
    -Dave

  • Missing features and bugs in 2.2 update...

    Missing features and bugs in 2.2 update...
    Here is my shortlist:
    1. Copy/Cut and paste - sadly still missing...
    2. Landscape view for keyboard - SMS and Email - still missing...!
    3. AM/PM indicator missing from "unlock" screen (in 12 hour clock) - BUG
    ... What's wrong with Apple these days - all of these issues (listed above) could have been easily implemented in version 2.2 and were frequently requested by all iPhone users since version 1.0 and yet Apple have ignored all of them...

    These features may or may not be that difficult to include, but what made you "fork out huge amounts to pay for a 'top of the range' iPhone" in the first place?
    As already provided, Apple has what is called their own "allocation of resources and prioritization", and if what is included doesn't meet your needs or wants, you should not have purchased an iPhone in the first place, or continue to keep using the iPhone if Apple doesn't include the features you need or want in a time table that meets your expectations, since there are plenty of cheap $100 phones that meet your needs or wants, you have a wide range of other phones to choose from which are less expensive, so that is exactly what you should do. No point in continuing to use a device that does not meet your needs or wants. Use one of the many less expensive devices you have to choose from that meets your needs or wants and move on.

  • Feature or bug? (ListView/SelectionModel)

    I attach a short program which illustrates a phenomenon I have observed. Basically, I am trying to repeatedly delete the first item displayed in a ListView. I select that item using SelectionModel.select(0) or SelectionModel.selectFirst() and then delete SelectionModel.getSelectedItem() from the underlying item list. The first time round it works. The second time round, SelectionModel.getSelectedItem() still returns the item from the first iteration. I would have expected the call to SelectionModel.select(0) to update selectedItemProperty. Have I misunderstood something? Should I be doing something different?
    Interestingly, a similar thing occurs if you replace select(0) with selectLast().
    But if you call select(1) everything works as I had expected (selectedItemProperty is updated).
    Feature or bug?
    Steve
    package selectionbug;
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ListView;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class SelectionBug extends Application {
        public SelectionBug() { }
        public static void main(String[] args) {
            Application.launch(SelectionBug.class, args);
        @Override
        public void start(Stage primaryStage) {
            final ListView<String> list = new ListView<String>();
            ObservableList<String> items =
                FXCollections.observableArrayList("abc", "def", "ghi", "jkl", "mno", "pqr", "stu", "vwx");
            list.setItems(items);
            list.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
                @Override
                public void changed(ObservableValue<? extends String> ov, String oldValue, String newValue) {
                    System.out.println("*** ChangeListener: "+oldValue+" -> "+newValue);
            Button button = new Button("Go");
            button.setOnAction(new EventHandler<ActionEvent>() {
                    @Override
                    public void handle(ActionEvent t) {
                        list.getSelectionModel().select(0);
                        //list.getSelectionModel().selectFirst();
                        //list.getSelectionModel().selectLast();
                        String string = list.getSelectionModel().getSelectedItem();
                        System.out.println(string);
                        if (list.getItems().remove(string)) {
                            System.out.println("removed");
                        } else {
                            System.out.println("oops");
            VBox vBox = new VBox();
            vBox.getChildren().addAll(list, button);
            Scene scene = new Scene(vBox);
            primaryStage.setScene(scene);
            primaryStage.show();
    }Edited by: winnall on 16-Mar-2012 00:35

    Hi, I'm the engineer behind the selection model API.
    There are a few things to note first:
    1) It is totally valid for the selectedItem to represent an item that is not actually part of the ListView.items list. It just means that if the selectedItem is set to a non-existent item, and when the item is added to the listview.items list, the selectedIndex will update to point to this selectedItem.
    2) Events don't fire when the property value doesn't change. So the first time you select(0) you end up with the selected index event firing as the new value is 0. If nothing else changes and you call select(0) again, you'll get no event fired.
    Now, I would argue that if the selected item / index is removed from the ListView.items list, it should be removed from the selection. This does not appear to be happening. There may be various reasons why this doesn't happen (selection models can have a LOT of nuances that all need to be keep balanced like a man with his spinning plates), but you should file a bug so I can investigate deeper.
    Thanks,
    -- Jonathan

  • TCP Reset Feature

    Hi!
    I would like to realize the reset of a single TCP connection (Ip adress + port number) using a
    CISCO IDS 4235,Version 4.1(5)S194, with a
    PIX 520, IOS Version 6.3(3) and a
    4500 router, IOS Version 12.0(8b).
    Is it really possible by this hardware?
    I think I need at least ROUTER IOS version 12.2(15), but I cannot do this upgrade on my device. Is it true?
    Is the PIX able of resetting the single connection? Maybe IOS Ver 7.00 needed?
    It's possible to upgrade PIX 520 ?
    Thank you in advance!

    TCP reset feature on the IDS by default will send out a TCP reset through the sniffing interface.
    However, it sounds like you are talking about shun connection rather than tcp reset. A shun will effectively block the connection by applying a filter (rather than a packet to terminate the connection), it does this by applying this filter on your router or PIX.
    On the PIX this is achieved through a filter function called a shun command. This is actually available on the version of PIX you are running (6.3.x)
    On the Router an ACL is applied on an interface.
    I hope that helps.
    -jonathan

  • Feature Requests/Bug Reports for PlayBook OS 2.0

    I'd like to report a few bugs/features that I think would really help make PlayBook better.
    Although most are minor items there is a chance that some items would be better suited as private reports directly to RIM.  If there is an appropriate channel to do so, please advise.
    For now, these 4 items are the main ones that come to mind.
    1.) Screen settings: I would **really**, **really** like to have an option to go to standby after 30min, 1hour, 2hours, or better yet - **never** (especially when I'm plugged in to A/C power or docked.  There are several apps I enjoy using (e.g. Browser) that I read/watch... only to have the device try to auto-suspend when the 5min is up.
    2.) If it is possible, it would be very nice if holding the volume up/down buttons actually continuously increased/decreased the volume vs. having to press the buttons multiple times
    3.) When using the Browser, I often minimize/auto-hide the location bar to maximize my screen real-estate... however when swiping down to view it... if I type a partial address and notice a match in the drop down for the site I want... I can't click on it, as this triggers the menu's auto-hide action
    4.) The new Messages app is great!  My only issue is that although I like the blinking red LED indicator (similar to a BB phone), the red corner marker in the top left of the screen is too distracting (and ruins the asthetics) of the apps/games I'm running when I get new messages all day long.  It would be very nice if there was a separate option for this indicator. (e.g. I still want the LED light, and the email count/icon indicator... just not the red corner overlay)
    Otherwise I'm loving my PlayBook both as a user and a developer and I'm looking forward to whats to come. ;-)
    PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
    BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****

    Allow me to use the native contact, calendar and email apps to work with my contacts, calendar and email that are on my phone/desktop. Can't believe that this is not already done.

  • Spotlight indexing of Time Capsule - feature or bug?

    I understand why backups are indexed: the ability to use Spotlight from within Time Machine is a fantastic feature.  But the method by which this index is created does not make sense where a Time Capsule is in use (or indeed most networked storage, but since many configurations are officially unsupported let's just keep this discussion focused on the officially approved one!).
    Typically (from my sample size of 1), a complete system backup is of the order of 100GB; however, after the initial backup is complete, Time Machine only needs to copy modified files to the backup drive, which can lead to very small and fast subsequent backups: unchanged files are created in-situ with a hardlink to the existing copy on the backup drive.
    A problem arises when, after a backup completes, Spotlight attempts to index the changes to the backup drive: it appears that it inspects every unindexed file (involves transfer to the local machine) including such unmodified/hardlinked files.  This therefore gives rise to a situation where a backup that writes only a few kilobytes to the backup drive results in Spotlight reading hundreds of gigabytes from that drive.
    Even with a throughput of 100Mbps, this would take close to an hour and a half (in reality, especially over wireless networks, it takes many hours); meanwhile Time Machine reaches its next scheduled backup and cannot proceed until Spotlight has finished indexing.
    Altogether, this appears to render Time Capsules useless for system backup (unless one is connected via gigabit ethernet, which is neither a requisite nor a desirable constraint).  One does not need to look far to see how many users this issue is affecting.
    In previous versions of OS X, one could workaround this issue by disabling Spotlight indexing of the backup volume; however, since Lion (or Snow Leopard?), this is no longer possible.
    To my mind, the design is flawed - some might call it a "bug": there should be a more efficient method of indexing drives, especially networked ones (ideally avoiding the redundancy of reindexing hardlinked files).  At worst, Time Machine could provide to Spotlight all the metadata it requires for the entire backup: thus avoiding the need for Spotlight to read such files from the backup volume.
    ...or have I misunderstood something?

    nickety wrote:
    I understand why backups are indexed: the ability to use Spotlight from within Time Machine is a fantastic feature.
    That's not the reason; Time Machine requires the indexing in order to work, especially for the "Star Wars" display.
    Altogether, this appears to render Time Capsules useless for system backup
    That's not normal; you have something else wrong, possibly a corrupt index.  See the pink box in #D2 of Time Machine - Troubleshooting.
    In previous versions of OS X, one could workaround this issue by disabling Spotlight indexing of the backup volume
    Not really.  The backups were still indexed;  you just didn't get a message.  See the note in item 2 here: http://docs.info.apple.com/article.html?path=Mac/10.6/en/8991.html

  • Double Clicking Issue Feature Or Bug

    Hi All,
    I've been using Mac's for over ten years and I'm experiencing an issue unlike anything I've ever seen before. I have this double-clicking issue (maybe more appropriately "accidental double-clicking issue") in certain programs.
    In iTunes for example, when I choose File/Add To Library and I double-click the root folder on my external hard drive (which contains subfolders such as Documents, Pictures, Movies, Music, Applications, etc..) iTunes begins to automattically import EVERYTHING on the folder without my having clicked the CHOOSE bubble. EVERYTHING!
    Either I'm crazy and I'm just noticing this now or this is the most annoying bug/feature I've ever seen.
    The issue also occurs in Mac The Ripper. When I went to choose a Save location and accidentally double-clicked a folder that had subfolders in it, I didn't get the opportunity to click CHOOSE. The Finder just assumed that my double-clicking a folder means that that is the folder I want to select.
    I hope I'm explaining this clearly. I don't know I never noticed this "feature" before!
    Is there anyway to turn it off?

    There isn't anything similar between the two in a hardware sense. The two machines aren't sharing anything. I only use the Magic Mouse with the new 27" i7 iMac.
    I tried to reproduce the effect in 10.5 to see if it was indeed a "feature", and it is. To a certain extent.
    At this point I've come to the conclusion that this is supposed to happen, in 10.5 and 10.6 (possibly 10.4 or earlier too) when a folder and it's sub-folders contain compatible files respective to the program attempting to access them. However, I don't think it should happen when a folder contains subfolders that have files that are incompatible with the particular program that is currently being browsed.
    Furthermore... I'm unable to reproduce the same issue today! This new 27" iMac i7 has been very "buggy" across the board!
    Like for example;
    When I first started it up, Airport and Firewire didn't appear in the Network preference pane in System Pref's. And it didn't recognize USB devices that I plugged in until I rebooted a few times.
    It ran REEEEEALLLLLLY HOT! Hot like when you put your hand on the hood of a car thats been sitting in the sun. But today it seems to be running much cooler...
    It also wont boot from any external hd or Disk Warrior 4.2 DVD.
    But all in all it's still a pretty sweet, and crazy fast.

  • PSE 7 - DEsign Feature or Bug?

    I wonder if the following is a PSE design feature or is really a bug.<br /><br />- In the Editor I have, say, 3 pictures open.<br />- I finish editing one and close it.<br />- Now the Organizer opens automagically!!!<br />- I would prefer the Editor to remain open, so I now<br />- Grumble and wish the system designers at Adobe certain "things" <G><br /><br />Does anyone have an answer to this?<br />Alexander (grumbled at least four times so far today...)

    When a picture is opened in Editor from the Organizer, on closing this picture in editor the focus shifts to Organizer. The Editor does not close in this case just the focus shifts back to Organizer. In my case this does not happen when there are multiple images opened from Organizer and I close one of them. We may be able to help you if you give us the complete workflow which you are following.
    -Smriti

  • What is proper way to report suggestions for app features And bugs to Apple

    What is the proper way to report suggestions for app features to Apple? Or, do they even want suggestions?
    And, how about reporting app bugs? Should I just assume the bug is already known, or is there a way for (quickly) reporting them?

    I'm not sure about bugs in non-Apple apps, but bugs in Apple apps can be reported via this form:
    http://www.apple.com/feedback/ipad.html

  • SetCurrentRow feature or bug?

    When trying to set the current row of a RowSet to a Row that are obtained from the same Rowset (using findByKey) but with a rangeSize smaller than the total number of rows in the row set, the method setCurrentRow(Row) of the RowSet doesn't work:
    ViewObject voLine = am.findViewObject("theVO");
    Row [] rLines = voLine.findByKey(new Key(new Object[]{ Pkval1, Pkval2 }),1);
    // to this point rLines > 0
    voLine.setRangeSize(-1);
    voLine.getAllRowsInRange();
    voLine.setCurrentRow(rLines[0]); //to this point there is no current Row of the V.O.
    Row row = voLine.getCurrentRow(); // row == null
    if you do:
    ViewObject voLine = am.findViewObject("theVO");
    voLine.setRangeSize(-1);
    voLine.getAllRowsInRange();
    Row [] rLines = voLine.findByKey(new Key(new Object[]{ Pkval1, Pkval2 }),1);
    // to this point rLines > 0
    voLine.setCurrentRow(rLines[0]); //to this point the current row of the V.O. is OK.
    Row row = voLine.getCurrentRow(); //row has the data you get the rowset correctly positioned.
    Is this a bug or a feature?, if a feature, did you forget to document it? Why do we have to learn those things the hard way?
    The desired behavior would be to move the RowSet to a new (valid) Row, regardless of the RangeSize setting that the Rowset
    had when the Row was found, next Rel please?
    OBC4J makes me remember that to developers:
    1) What seems easy is difficult,
    2) what seems difficult is Impossible,
    and 3) what seems impossible that guy at the corner store is doing without Computers... :)
    null

    Hi Alexander,
    Sorry your experience has been frustrating.
    In your first code snippet, here is what is happening:
    When you call findByKey, BC4J looks in the cache for the rowset of the VO. If it does not find the information you have asked for in the cache, it creates a new, temporary view object on your behalf, and uses that to retrieve the rows. Now, when you later call setCurrentRow, you're setting the current row of the temporary view object. The next call to getCurrentRow on the original view object doesn't work. I'm sure there are some cases where this behavior is desirable, and doesn't cause adverse side-affects.
    I'm sorry if I'm doing a terrible job explaining this. It is coming second hand from the developer I spoke with. He said that using getRow() instead of findByKey() was a better way to ensure you're working the VO you specify.
    BC4J can be a pretty complicated but powerful framework. We are continually trying to improve our documentation coverage, but it is a huge job.
    We appreciate your patience and your feedback, and we do put it to good use!

  • MapViewer Bean Feature Requests & Bug Tracking?

    Hi-
    I'm wondering where I should post feature req's and bugs for the MapViewer bean. Is there a place where these things are tracked?

    Please post here. The dev team will collect and track them internally. Or if you are a customer you can always go to metalink.oracle.com and post over there. The product id for mapviewer is 1215.
    thanks,
    LJ

  • TCP problem/feature

    I am looking into a potential TCP problem I have found during comms
    testing in our system running HP-UX 10.20. The problem is as much a
    problem as it is a feature. This is how it happens:
    * Client and server establish TCP connection. netstat -a shows state
    as ESTABLISHED.
    * Server side shuts down. TCP layer sends FIN to client, client sends
    ACK back. State changes to FIN_WAIT_2.
    * Client PC crashes never closing connection properly (normally it
    sends FIN to which server replies ACK and state goes to CLOSED)
    * Server computer keeps connection in the FIN_WAIT_2 indefinitely
    tying up the server well-know port.
    * Server cannot re-start, error "port already in use."
    The TCP protocol allows for this situation. Now, HP, in
    violation of the protocol (same as some other TCP Berkeley implementations),
    has a way to have FIN_WAIT_2 states timeout. The way they do it is by
    zapping kernel memory with adb to turn the timeout mechanism on and set the
    timeout value. They do this with a shell script. If you want this timeout
    to be a permanent feature you have to have it execute each time you reboot.
    Our Forte application is TCP based, since given the right sequence
    of events this scenario can happen to anyone, I wonder how Forte deals with
    it and whether it can present a problem.
    Many thanks
    J. Suriol

    hi mike...thanks again...
    I created two parallel loops as you said...it works fine but one problem is there....as I said two parallel while loops are there with separate stop button...so when I start vi both are starting.... when I stop the my other code while loop it stops but my tcp vi does not stop even I stop the button because it is in the forever state...so it does not reach that button until the client initiate for once atleast....I just want to exit this forever state from server side.whenever server wants... 
    how to terminate that forever state from tcp listen vi?
    Attachments:
    tcp.png ‏158 KB

  • Keynote hides .key file extension on save - feature or bug?

    I haven't been able to track anything down about this in the forum...
    I've created a new file in Keynote '09, and saved it with the standard .key extension. When I open the file, edit it, and "save" it, Keynote hides the extension. If I go to the file in the Finder, select it and show info, and un-check "hide extension", the .key reappears as expected. But the next time I save it in Keynote, Keynote hides the extension again.
    I know that the new file format is really a .zip file, so that's why I'm wondering if this is supposed to be a feature even though it seems like a bug.
    Anyone have any insight on this?

    I've seen this in the past... someone else has posted it before and I tried the same thing. I think it IS a bug, so you should report it here.
    http://www.apple.com/feedback/keynote.html

  • Firmware update reduced features, increased bugs 2...

    Hello, i updated my Nokia 2700c firmware last night in the hopes that it might get rid of some bugs that i found very irritating after the last forced update by the Nokia care (after a problem with the phone, instead of reinstalling the same version they updated it instead).
    But the bugs have now grown in number as well as a bit more serious now.
    --The phone now doesn't read the name of a contact, in the from field in sms or call list which has more than one number saved or even randomly, some numbers have it displayed, some don't.
    --The media player starts playing a song after a 5sec lag in which the phone is unusable, like if i am texting at the same time, it would stop responding,
    this becomes worse by the balance notifications after every sms by my operator, in which case it notifies by sounding the sms tone 2 times but now with a 5sec gap in between while playing music, thus making the fone pretty much useless for those 15secs.
    --The screensaver functionality is gone.
    --The main menu has a menu option repeated one more time, which i never used in the first place.
    --The T9 text entry has a lot of bugs with the order of matched words.
    --The transition effects have all gone slow, thus prompting me to switch them off.
    I can live with the last four but the first 2 i've listed have completely turned me off. Why isn't adequate testin done before releasing an update?
    The first version of the device was 7.15, which was updated to 7.80 and this latest one is v9.95(?) i guess they even typoed the version number in this one (9 instead of 7) cause it doesn't look like such a major 'upgrade'.
    Please tell me is there any solution to these problems?? Or am i stuck with these bugs for good?
    Thanks.

    Update: Managed to fix the second issue by a hard reset.

Maybe you are looking for