|
|
Subscribe / Log in / New account

That's silly. You can have strlcat() and strlcpy(), yet be compatible

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 20, 2009 18:53 UTC (Wed) by MisterIO (guest, #36192)
In reply to: That's silly. You can have strlcat() and strlcpy(), yet be compatible by dwheeler
Parent article: EGLIBC: Not a fork, but a glibc distribution

But what's the problem about using libbsd anyway, if you want those functions?


to post comments

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 21, 2009 9:23 UTC (Thu) by danpb (subscriber, #4831) [Link] (17 responses)

Or if someone is really soooo desperate to use these 2 functions, just copy the source for them into the application codebase, so they can be guaranteed available on every possible platform. Many apps already do this kind of thing when using GNULIB, which includes source for a great many standard POSIX/libc functions, to be used on OS where the normal impl is broken / incomplete. It seems to me that most people are just using strlcat() / strlcpy() as an excuse for bashing glibc. Back in the real world there are many trivial solutions, and the lack of inclusion of these APIs in glibc really isn't blocking their use in any app that wants them.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 21, 2009 10:12 UTC (Thu) by nix (subscriber, #2304) [Link] (16 responses)

The lack of proper randomness of strfry(), though, that really is a major problem.

One complaint I really can't have about Ulrich is his commitment to a stable ABI. Yes, he's canned stuff in the past that has broken things like the JDK, but those were internal symbols exposed because the linker had no way to hide them at the time. The public interface really has maintained stability, right down to legacies of glibc's embryonic days like strfry()/memfrob() which have probably been used by about one person in the entire history of the world.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 21, 2009 12:50 UTC (Thu) by liljencrantz (guest, #28458) [Link] (15 responses)

Chain of events, probably not chronological, but illustrative:
  1. Drepper co-creates a much quicker, Posix-compliant threading implementation, which significantly helps Linux performance of e.g. MySQL and increases adoption of LAMP stack.
  2. Somebody with way too much time on their hands thinks it would be hillarious to add a funciton to make a random anagram of a string to glibc as a joke and gets it snuck into the codebase, where it becomes part of the stable API and has to be supported by somebody else. Forever.
  3. Drepper significantly optimizes the glibc footprint and helps out with defining the posix libc specification.
  4. Sombody else with even more time on their hands figures the useless anagram function isn't completely random and sends a broken patch.
  5. Drepper writes the excellent «What every programmer should know about memory», published on LWN and then given away for free.
  6. Sombody else with even more time on their hands figures the useless patch to the useless anagram function isn't completely random and sends yet another patch.
  7. Drepper doesn't want to include the useless anagram patches because he feels other tasks (like, you know... anything that isn't completely useless navel-gazing wankery) are more pressing because nobody uses strfry. On the account of it being a joke. Not a single use of strfry on my Ubuntu system.
  8. People decide Drepper is a pain to work with because he drops important patches and should preferably be kicked out of the open source community.
Yeah...

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 21, 2009 16:36 UTC (Thu) by nevyn (guest, #33129) [Link] (11 responses)

> [snip strfry strawman]
> People decide Drepper is a pain to work with because he drops important
> patches and should preferably be kicked out of the open source community.

I've written patches for glibc that fixed bugs in functions pretty much every application uses, and have been accepted. I've spoken to people who have contributed even more.

I've yet to speak to _anyone_ who has anything better to say about working with Drepper than "he's actually an ok human being, if you meet him in real life".

To say I've contributed to glibc less because of Drepper, would be a vast understatement. It's been a running joke for a long time, that if you don't need to contribute to glibc don't ... and if you do, open a Red Hat Bugzilla so you just have to deal with Jakub.

The biggest problem I see with eglibc is that due to the compatibility requirements there are a large amount of things that can't be done. They really seem to be trying to stay very close to glibc, so the only thing it changes is that you can now s/Jakub/eglibc/ in the above.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 22, 2009 11:14 UTC (Fri) by liljencrantz (guest, #28458) [Link] (9 responses)

The comment I replied to specifically brought the strfry function up. So does the web page explaining why Debian has switched to eglibc. Different people have at multiple times stated that this is one of the important reasons for switching away from glibc, and I was making a direct response to one of them. Please explain to me how I am making a strawman argument.

Other then that, I agree with your comment. Drepper is by default terse to the point of approaching continuous rudeness. When people try to waste his time, he will flame them. He even perceives people as wasting his time when they are actually making valid questions sometimes. He is hard to work with. Glibc would be better of if he wasn't.

But much like Theo, Drepper is an exceptional project leader when it comes to technical aspects. The most relevant question is, would glibc be better of without him? Would it be better if an average coder with good people skills was managing the project? My guess would be no, that all the combined lost contributions from other people are smaller in value than his contributions to Glibc. Same thing with Theo. On the other hand, my guess would be that Jörg Shilling and the XFree86-people fall on the other side of that line. But that's just me guessing.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 9:07 UTC (Sat) by nix (subscriber, #2304) [Link] (2 responses)

Er, the comment you replied to was a tongue-in-cheek joke, pointing at
aspects of Ulrich's maintainership that I really don't have any sort of
problem with (hell, I don't care much about strfry() either: if only
glibc's objects were sorted so strfry() wasn't pulled into memory on the
majority of systems... and now with the paging-prefers-executables stuff
it won't even get pushed out again.)

Did you really not see that?

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 10:04 UTC (Sat) by liljencrantz (guest, #28458) [Link] (1 responses)

I am sorry, I did not. My bad. On the other hand, I do not think the same argument was ironic when used to motivate Debians use of eglibc.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 11:37 UTC (Sat) by nix (subscriber, #2304) [Link]

The point isn't strfry() et al. It's that Ulrich's behaviour towards
someone trying to fix a bug in that exemplifies his behaviour towards
*anyone* trying to contribute *anything*, except if he's known them a long
time (and sometimes not even then).

I could dig up dozens of examples but it's too depressing and it's a bank
holiday here and I have two flashy new Nehalems to bring up (die, old
ten-year-outdated PIIIs! ... only thing is I'm not sure 36Gb RAM in the
two combined will be enough ;} )

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 9:22 UTC (Sat) by nix (subscriber, #2304) [Link] (5 responses)

Drepper is an exceptional project leader when it comes to technical aspects
For the record I consider this incorrect. He's an excellent hacker and virtually everything he implements is a sort of glittering jewel, perfectly designed (and perfectly undocumented and he has a habit of ignoring contributions of documentation). He'd make an excellent contributor. But unfortunately that is not his role in glibc. Maintainers' roles are higher-level, and there is where Ulrich's bad side comes out.

He drops subsystems that he thinks are rarely used or that relate to architectures he merely finds unpleasant (e.g. MIPS, ARM) without listening to anyone pointing out that he might be wrong and without saying why; more than once he's rejected contributions, implemented them nearly identically himself some time later and credited himself alone in NEWS (I suspect anyone working in academe decided never to go near glibc again when that happened for the first time); he mostly refuses to give rationales for technical rejections so that people can fix whatever was wrong with their patches. Whether this is because he's scared of being convinced otherwise or just arrogant I have no idea... but can you imagine what would happen to the kernel, say, if it was run that way? 90% of the useful stuff we now have, maybe more, would simply not be there.

He's such a hard maintainer to deal with that an entire mailing list was created whose sole reason for existence was that it was somewhere where people could talk about glibc without Ulrich growling at them every five minutes for 'abusing' libc-alpha@ by, uh, discussing alpha releases of glibc on it. I have never seen *that* in any other project.

Developers can be in a project to scratch their own itch: but I think glibc is proof that large free software project maintainers need other goals too. First and foremost I think they have to be driven by a desire to make software that others can hack on easily and that does what users want, and in both of these areas Ulrich falls down like a lead balloon (especially when you note that glibc's users are random developers, and we've seen how he treats them when they dare to ask for help with one of his glibc-only totally-undocumented public APIs).

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 10:15 UTC (Sat) by liljencrantz (guest, #28458) [Link] (3 responses)

I think it's a pretty sane model to make the mainline version of a project only handle a small number of architectures, and force people who use rare architectures to create a «portable version». This means the maintainer doesn't have to be an expert on 20 different wonky architectures, and cleanly separates the responsibility of portability from the responsibility of development. This is what e.g. the OpenSSH people do.

As to dropping good patches and then reimplementing them himself while taking full credit, I had not heard such accusations before. Do you have any specific patch set in mind, something to validate this?

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 11:51 UTC (Sat) by nix (subscriber, #2304) [Link]

I'll have to dig it up. It didn't happen often and it was years and years
ago: I dithered about including it. It's not the real problem, to me:
maybe he changed his mind and forgot the original contribution had ever
existed, which is fine. The real problem is his attitude to contributions.

Rare architectures

Posted May 24, 2009 10:06 UTC (Sun) by man_ls (guest, #15091) [Link] (1 responses)

I'm sorry, but ARM is not a "rare" architecture. It is #4 for Debian, and would rate #3 if arm and armel were counted together.

Rare architectures

Posted May 24, 2009 11:45 UTC (Sun) by nix (subscriber, #2304) [Link]

More generally, there are more ARMs made than any other processor by a
considerable margin. It's only 'rare' if you ignore the embedded space
completely.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 12:06 UTC (Sat) by nix (subscriber, #2304) [Link]

Lest this seem pointlessly nasty I think the emerging de-facto split is
pretty much ideal: it leaves Ulrich and a few others to do technical
wizardly in the alleged 'upstream' where they don't have to do anything
hard like interact with human beings, and everyone else can go to eglibc,
where all the contributions from everyone else and all the stuff people
need to actually build a glibc for the distributions (other than RH) can
be added on.

This is in effect the split that has long existed anyway: it's only that
the distro stuff was split across dozens of repositories, which made it
very hard for people building their own glibc to do so. Now it's made much
easier, and everyone is in their ideal positions and can be happy :) and
Ulrich doesn't have to talk to anyone he doesn't want to, ever again,
which I suspect will make him happy. Or at least less grumpy. :)

bindresvport is another good case

Posted May 25, 2009 14:00 UTC (Mon) by saffroy (guest, #43999) [Link]

And even dealing with Jakub does not save you from having sane suggested improvements blocked forever by Ulrich: in the following case, where the glibc implementation of bindresvport is shown to be causing serious problems in very legitimate use cases, and while other distros and OSes (eg. SuSE, FreeBSD, Solaris) offer better solutions, our respected maintainer prefers some kludgy workaround (ie. portreserve):
https://bugzilla.redhat.com/show_bug.cgi?id=103401

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 21, 2009 21:19 UTC (Thu) by nix (subscriber, #2304) [Link] (2 responses)

Your timeline is trivially false from inspection of the source, simply
because strfry() and memfrob() were implemented over a decade *before*
NPTL, in the very early days of glibc, not by some random nobody but by
Roland McGrath, the original author of glibc and still its co-maintainer.

It was implemented at the same time as a heap of K&R-related horrors and a
fix to strstr(): I suspect Roland was very bored after that and wanted to
do something fun to flush his brain out. Hence the glorious uselessness
that is strfry() and memfrob(). Their negative consequence is principally
that they sort lexicographically next to heavily used functions, and there
is no attempt to sort objects in libc.so according to frequency of use: so
these two functions reside permanently in memory on most Linux systems,
dragged in because the other str*() and mem*() functions are next to them
and in essentially continuous use.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 22, 2009 10:59 UTC (Fri) by liljencrantz (guest, #28458) [Link] (1 responses)

I specifically stated that the chain of events was unlikely to be chronological. :)

I didn't know it was McGrath that implemented them, but it doesn't change the fact that Drepper is (IMO) well within his right to say that he does not wish to waste his time by partaking in the joke, and when people again and again try to force him to do so, he is well within his right be grumpy.

The guys that keep pushing the patch are like some nerds I know, who keep making jokes about something very nerdish, e.g. phasers or VAX systems, in a group of people completely indifferent to the subject. Nobody gets the joke, nobody laughs, but they keep pushing the joke, trying to explain why it's funny instead of just dropping it.

That's silly. You can have strlcat() and strlcpy(), yet be compatible

Posted May 23, 2009 9:04 UTC (Sat) by nix (subscriber, #2304) [Link]

Er, they're perfectionists. They want strfry(), as long as it's there, to
be as good as it can be. Having a function that's both a joke *and* broken
would be worse yet. Ulrich is a perfectionist too, but a curiously
selective one: he only cares that the parts of glibc that he uses or that
someone's paying him for are perfect. The rest (unusual ports, locales,
POSIX functions he dislikes) can go hang.

Personally I think that's a rather discreditable attitude in a maintainer,
but maybe that's just me.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds