Goto

Collaborating Authors

 goroutine


DR.FIX: Automatically Fixing Data Races at Industry Scale

arXiv.org Artificial Intelligence

Data races are a prevalent class of concurrency bugs in shared-memory parallel programs, posing significant challenges to software reliability and reproducibility. While there is an extensive body of research on detecting data races and a wealth of practical detection tools across various programming languages, considerably less effort has been directed toward automatically fixing data races at an industrial scale. In large codebases, data races are continuously introduced and exhibit myriad patterns, making automated fixing particularly challenging. In this paper, we tackle the problem of automatically fixing data races at an industrial scale. We present Dr.Fix, a tool that combines large language models (LLMs) with program analysis to generate fixes for data races in real-world settings, effectively addressing a broad spectrum of racy patterns in complex code contexts. Implemented for Go--the programming language widely used in modern microservice architectures where concurrency is pervasive and data races are common--Dr.Fix seamlessly integrates into existing development workflows. We detail the design of Dr.Fix and examine how individual design choices influence the quality of the fixes produced. Over the past 18 months, Dr.Fix has been integrated into developer workflows at Uber demonstrating its practical utility. During this period, Dr.Fix produced patches for 224 (55%) from a corpus of 404 data races spanning various categories; 193 of these patches (86%) were accepted by more than a hundred developers via code reviews and integrated into the codebase.


Go-Oracle: Automated Test Oracle for Go Concurrency Bugs

arXiv.org Artificial Intelligence

The Go programming language has gained significant traction for developing software, especially in various infrastructure systems. Nonetheless, concurrency bugs have become a prevalent issue within Go, presenting a unique challenge due to the language's dual concurrency mechanisms-communicating sequential processes and shared memory. Detecting concurrency bugs and accurately classifying program executions as pass or fail presents an immense challenge, even for domain experts. We conducted a survey with expert developers at Bytedance that confirmed this challenge. Our work seeks to address the test oracle problem for Go programs, to automatically classify test executions as pass or fail. This problem has not been investigated in the literature for Go programs owing to its distinctive programming model. Our approach involves collecting both passing and failing execution traces from various subject Go programs. We capture a comprehensive array of execution events using the native Go execution tracer. Subsequently, we preprocess and encode these traces before training a transformer-based neural network to effectively classify the traces as either passing or failing. The evaluation of our approach encompasses 8 subject programs sourced from the GoBench repository. These subject programs are routinely used as benchmarks in an industry setting. Encouragingly, our test oracle, Go-Oracle, demonstrates high accuracies even when operating with a limited dataset, showcasing the efficacy and potential of our methodology. Developers at Bytedance strongly agreed that they would use the Go-Oracle tool over the current practice of manual inspections to classify tests for Go programs as pass or fail.


How Go Helped Me Accelerate My Machine Learning Computations

#artificialintelligence

Fine, I got your back: Here, I share my story of using Go language to reduce the time of machine learning computations of my project from one week to less than 24 hours. To meet the deadline, I had to submit my results within 3 days. Persuading enough?:D Then follow along! As a master's student, I had a ton of stuff to do from working on my thesis, applying for PhD positions, possible internships, and so on. On top of all these stuff, I had to have the report of my research ready for submission to the target conference.


Why we're writing machine learning infrastructure in Go, not Python

#artificialintelligence

At this point, it should be a surprise to no one that Python is the most popular language for machine learning projects. While languages like R, C, and Julia have their proponents--and use cases--Python remains the most universally embraced language, being used in every major machine learning framework. So, naturally, our codebase at Cortex--an open source platform for deploying machine learning models as APIs--is 87.5% Go. Machine learning algorithms, where Python shines, are just one component of a production machine learning system. Cortex is built to automate all of this infrastructure, along with other concerns like logging and cost optimizations. A user can have many different models deployed as distinct APIs, all managed in the same Cortex cluster.


GetStream.io: Why We Switched from Python to Go – codeburst

@machinelearnbot

Switching to a new language is always a big step, especially when only one of your team members has prior experience with that language. Early this year, we switched Stream's primary programming language from Python to Go. This post will explain some of the reasons why we decided to leave Python behind and make the switch to Go. The performance is similar to that of Java or C . For our use case, Go is typically 30 times faster than Python.


Implementing an intelligent version of the classical sliding-puzzle game for unix terminals using Golang's concurrency primitives

arXiv.org Artificial Intelligence

An intelligent version of the sliding-puzzle game is developed using the new Go programming language, which uses a concurrent version of the A* Informed Search Algorithm to power solver-bot that runs in the background. The game runs in computer system's terminals. Mainly, it was developed for UNIX-type systems but it works pretty well in nearly all the operating systems because of cross-platform compatibility of the programming language used. The game uses language's concurrency primitives to simplify most of the hefty parts of the game. A real-time notification delivery architecture is developed using language's built-in concurrency support, which performs similar to event based context aware invocations like we see on the web platform.