7 ms·
A post in which I try to rubber-duck a CoreWCF issue I've been having, because stackoverflow no longer seems suitable for asking questions about programming iss
by eterm 1y ago
A post in which I try to rubber-duck a CoreWCF issue I've been having, because stackoverflow no longer seems suitable for asking questions about programming issues.
Screaming into the void of the blogosphere is catharsis for getting my SO question closed.
And because I know you're all nosy, the SO question is here: https://stackoverflow.com/questions/79605462/high-cpu-usage-in-corewcf-after-streaming https://stackoverflow.com/questions/79605462/high-cpu-usage-... . Please feel free to point out more ways in which I screwed up asking my SO question.
- agos 1y agofor what it's worth, I submitted the question as a candidate for reopening
- matsemann 1y agoHonestly, I agree with it not being a good fit for a Q&A site. It's a debugging problem, probably needing a discussion, and might even not be of any use to others being that "high cpu" is kinda vague. Seems better suited for a bug report / issue tracker of the relevant library.
- jve 1y agoA community site for multiplayer debugging... I like it! Some people like to tackle problems and feel rewarded when they crack the nut :)
- eterm 1y agoYour'e right, "High CPU" just means more than zero. It was a symptom of the stream continuing to be written to. I've edited the title now to be better.
- wokwokwok 1y agoHow can a question that is: 1) clearly technical 2) reproducible 3) has a clear failure condition Not be a suitable candidate for S/O? Did we step into a dimension where only "How do I print('hello world')?" is a valid question while I wasn't watching, because it has a trivial one-line answer? Hard questions doesn't mean they're bad, it just means many people aren't competent answer them. The same goes for obscure questions; there might just not be many people who care, but the question itself is entirely valid. Does that mean they're not suitable for S/O? I... can't believe anyone seriously believes that hard niche problems are too obscure or too hard for S/O to be bothered to grace themselves with. It's absurd. It just baffles me that a question that might take some effort to figure an answer out to might 'not be suitable' to S/O.
- robertlagrant 1y ago> 2) reproducible Is it? What hardware and OS version should I use to reproduce the server?
- Const-me 1y agoAlmost any hardware, .NET runs on x86, AMD64, ARMv7 and ARM64 processors. Almost any desktop or server OS, .NET runs on reasonably modern versions of Windows, Linux and MacOS. The complete source code of the server is in the question.
- robertlagrant 1y ago> .NET runs on x86, AMD64, ARMv7 and ARM64 processors. Almost any desktop or server OS, .NET runs on reasonably modern versions of Windows, Linux and MacOS. I'm not really asking where .NET runs; I'm asking what is the environment to reproduce it in? If it only affects certain ones it's a waste of time to just make people guess. > The complete source code of the server is in the question. Yes, I saw.
- Const-me 1y agoThe .NET runtime is cross-platform, the lower level asp-net infrastructure is included in the runtime. The higher level CoreWCF RPC library OP uses is written fully in C#. I would expect it to run in all environments supported by the .NET runtime. Personally, I have reproduced the bug on Windows 10 running on AMD64 processor. BTW, the code in the question only communicates to localhost address i.e. doesn’t need any networking on the computer.
- francisofascii 1y agoI could see it being useful to others. If there is an internal bug that causes the issue or even a code pitfall that causes this issue.
- kristianp 1y agoStackoverflow is basically a site to help people with programming problems. That includes debugging a problem. I think it's sad that many types of question are not considered suitable for the site. The question was closed as "Not suitable for this site", whatever that means. Tangentially, one thing I think StackOverflow misses in its policy is in not allowing questions that ask for help to evaluate libraries and products in the developer space. There are many questions on SO where someone has asked what is the best library for X, and the question is closed due to site policy, but I think a discussion of what library is best for a use case is a very useful thing to have on SO. The answer to the question can change over time, and multiple alternative solutions can be presented. This is the kind of thing that Reddit has taken over for many different product recommendations, but reddit answers are just comments, they don't have the UI of SO's for commenting on questions and answers.
- balls187 1y agoI don't see anything wrong with your SO question (I am a long time contributor), and don't see why it would have been closed. I will say, this is a level of question that is too sophisticated for SO, and likely will only have an answer once you figure it out and go back and answer your question. Are you confident the code is the issue--have you repro'd it consistently with different versions of .NET? What about reproing on different machines? Locally?
- rendaw 1y agoDo they have some metric whereby all questions must be answered in some time period? Why not just leave it open then? What if someone else has the same question and figures it out later, now they can't answer it either! I had the same suspicion though, which is that if the question is too difficult it triggers some reflex...
- skinkestek 1y ago> I will say, this is a level of question that is too sophisticated for SO Could it be that, for years, they've been selecting for things like: - Low friction onboarding - Upvoting “easy wins” and thought experiments over real-world, in-the-trenches problems - Penalizing questions that didn’t fit the format—even when those of us around since the early days knew they’d likely get good answers within a few days - Incentivizing moderators to strictly enforce rules that, frankly, weren’t necessarily great to begin with Just a thought.
- robertlagrant 1y ago> Please feel free to point out more ways in which I screwed up asking my SO question. With pleasure! SO is definitely more of a distinct Q&A site and not a discursive, open-ended collaborate and problem-solve site.
- zahlman 1y agoI fully expect nobody in this comment section to care about the CoreWCF content. (I don't even know offhand what that is.) In my experience, people love talking about Stack Overflow in places that are about programming but aren't Stack Overflow, so. (Edit: it seems people do care about CoreWCF ITT. That's nice to see.) > Screaming into the void of the blogosphere is catharsis for getting my SO question closed. That's fine. Almost everyone who comes to SO, in my experience, has a fundamentally wrong idea about how the site is intended to work. That includes people who don't have a question and only want to post answers. Unfortunately, it's difficult to explain because people find the model unintuitive - the UI affords using the place just like many others, even though the site was created exactly to get away from frustrations caused by older models (https://meta.stackexchange.com/questions/92107 https://meta.stackexchange.com/questions/92107). And the real objective is a synthesis of many not-always-compatible ideas (https://meta.stackoverflow.com/questions/254770 https://meta.stackoverflow.com/questions/254770). My personal sense is that the community didn't really get a handle on "what SO is" until around the time that new question volume peaked (way back in 2014). Even then, people can hang around for years and not really get it (e.g. https://meta.stackoverflow.com/questions/427224 https://meta.stackoverflow.com/questions/427224) - in large part because the policies have been inconsistently applied on a volunteer basis, and the people who are allowed to e.g. cast close votes are vastly outnumbered. We generally don't care about people not liking the Stack Overflow model while discussing it off-site. There's far too much of that to worry about. But that doesn't mean we'll change to accommodate everyone else. The entire point is to provide something that isn't available everywhere you look: a polished artifact, an organized repository of commonly-needed, high-quality answers to clear, focused, practical questions. Do we accomplish that goal? Hell no, not by a long shot. But there are some real gems in there - and a few of them have millions of views. And as the rate of new questions slows, users who put on the "curator" hat become able to keep on top of the incoming queue, filter through for what's of value (and not a duplicate), and even turn attention towards the old Q&A to improve it (incidentally, a lot of that work is rounding up old duplicates that went unnoticed). > I had forgotten that any external links are a big no-no in SO land, so my question immediately attracted 2 close votes. The problem isn't simply including an external link (we'll happily just edit those out if they aren't necessary). The problem occurs when a question appears to depend upon the externally linked content. We can't accept that (https://meta.stackoverflow.com/questions/254428 https://meta.stackoverflow.com/questions/254428) because of link rot and licensing issues (someone who wants to answer you often needs to be able to cite the code; posting on-site automatically licenses the content appropriately, per the terms of service) but mainly because of scope - a question that's suitable for the Stack Exchange format would fit neatly within the actual question text. We don't want to do detailed analysis of the problem you encountered, even if we're capable of it, because questions are for everyone. They need to be able to reflect a problem that other people could a) have; b) plausibly search for; and c) recognize if they found it. Answers to a question need to make sense in general to people who would ask - not just in the specific context of one person's original problem. In short, we want a question, not a problem - and extracting a proper question starts with (https://meta.stackoverflow.com/questions/261592 https://meta.stackoverflow.com/questions/261592) your own analysis. "How do I do X?" questions are usually much easier to ask in the format, and are very valuable and can end up very well regarded, even when they're on very basic topics. But "what went wrong with Y code?" is not fully refined. What we're really looking for is more like "why does Y' code construct do Z?" - where the specific, exact cause of failure (https://stackoverflow.com/help/minimal-reproducible-example https://stackoverflow.com/help/minimal-reproducible-example) is extracted from your own debugging session (along with reproducing input and actual vs expected output). > Two days later my question got it's third vote for closure, and remains unanswered and now closed forever. This is literally not how Stack Overflow works. The OP has at least (https://stackoverflow.com/help/auto-deleted-questions https://stackoverflow.com/help/auto-deleted-questions) 9 days to fix the question and nominate it for reopening until it gets "deleted"; but even then it's a soft deletion (delisting) which is still reversible - you can find the question from your personal listing (https://stackoverflow.com/users/deleted-questions/current https://stackoverflow.com/users/deleted-questions/current while logged in; or replace 'current' with your user ID), edit and nominate for undeletion. The established policy is that we intentionally close questions that don't meet standards (https://meta.stackoverflow.com/questions/417476 https://meta.stackoverflow.com/questions/417476) as quickly as possible (https://meta.stackoverflow.com/questions/260263 https://meta.stackoverflow.com/questions/260263). The main point of this is to prevent the sort of people (notice that https://meta.stackoverflow.com/questions/271684 https://meta.stackoverflow.com/questions/271684 is over 10 years old; and the original complaint https://meta.stackexchange.com/questions/9731 https://meta.stackexchange.com/questions/9731 is from before the official launch, during the private beta) who would otherwise hang out on a traditional discussion forum 12 hours a day from trying to read the OP's mind, repost the same basic explanation of the same basic idea dozens of times, etc. (Unfortunately, the incentive system is completely broken - https://meta.stackexchange.com/questions/387356 https://meta.stackexchange.com/questions/387356 - and the company's interests are not aligned with the community, so this is a losing battle.) And, in fact, your question has been reopened, as of about 3/4 of an hour after your comment that I'm replying to. Stack Overflow is not at all immune to external pressure - after all, many regulars there are also on HN and other usual-suspect sites. It also looks like your edits have actually improved the question. In particular, adding in a definite conclusion from your profiling attempt. (We understand that a lot of people in a situation like yours wouldn't necessarily know how to use a profiler and wouldn't necessarily be able to come up with a theory about what's wrong. That isn't our problem. We aren't offering tech support. It's a bitter pill for almost everyone, but Stack Overflow by design is not there to make your code work. It's there to answer questions that arise during your attempt. And a question like yours, properly refined, can help those other people.)
- npodbielski 1y agoHey mate is it your post? I did glanced at it and it does not stop because server is not notified that client is not there. Or at least that is my guess, since I stopped working with WCF about 2016 probably. Anyway in newer version of .net you CancellationToken everywhere what would do exactly that: tell your server that client disconnected. That would be my first try on fixing it. Use token that is sent via HTTP implementation to the endpoint, pass it to your stream and when it is cancelled, end the stream. Stream ends, endpoint finishes, not CPU load.
- treebeard901 1y agoYeah the stream isnt being closed properly as it is likely still trying to fill a buffer that no longer exists. The CancellationToken is a good idea regardless because you know once youve written the result, that you no longer need to wait for results. Using has similar problems with things like database connections remaining open.
- the_clarence 1y agoThe same has happened on reddit a long time ago. Most users give up early because they get their forst posts (on any community) removed many times before they can manage (if they do manage) to post it. If the feedback loop was faster (you instantly get feedback on why the post doesn't go through) it would be better although you would already lose some users. The situation is so bad that I predict reddit is slowly dying already
- ryandrake 1y agoAs a general rule, I'm not going to take the time to donate free content to a site where moderators just delete it. This goes for S.O., Wikipedia, Reddit, Social Media, OSM, even HN. If my posts ever start getting flag-killed here, I'm not going to complain--I'm just going to leave, assuming the feelings are mutual. I used to habitually post to Fark.com, and when their moderators started going out of control and deleting my (and others') posts, I just canceled my subscription and went away. Who needs that grief? If S.O. believes that deleting everything users post there is somehow improving their site and going to make it relevant again, more power to them. It's their site. Let's see how that goes for them.
- socalgal2 1y agothis will no longer happen because everyone has learned to just ask the LLM who will just answer. No need for reddit or S.O. for tech questions
- rendaw 1y agoJust anecdoting, a couple weeks ago I asked my first question about the definition of `width` in CSS and how it pertains to minimum size calculations. It was immediately closed as off-topic with 3 votes. One commenter asked "can't you figure that out using developer tools?" It was eventually reopened, but I'm never asking a question there again. FWIW one of the governing web bodies essentially says "If you have technical questions, ask them on SO and not here" - I take this to mean that they don't care if you are able to answer your question, they just want you to go away.
- prinny_ 1y agoI have stopped asking questions there. The moderation is so heavy handed it astonished me. I asked a question about some typescript types of an external library, the very author of those types replied and answered my question and I replied that I was happy with his answer and to thank him for his work on the library. The mods deleted my reply. Was it so important for the quality of the site to delete a reply thanking someone for their OSS contribution? Is SO a better site now? Meanwhile they have 10 year old answers still up, with no way to indicate they are outdated unless the author themselves goes through the trouble of updating their answer.
- Const-me 1y agoNot sure it’s the main issue, but your infinite random stream implementation is broken due to integer overflow. Stream.Position is using int64 for a reason, but your _sequence field is int32 which wraps after 2GB. BTW C# compiler has a setting to convert arithmetic overflows into runtime exceptions, too bad Microsoft neglected to enable by default.
- throwaway2037 1y agoI upvoted your SO.com question Can you put a bounty on it? That will help.