A numerical investigation of grain-boundary grooving by means of a level set method is carried out. An idealized polycrystalline interconnect which consists of grains separated by parallel grain boundaries aligned normal to the average orientation of the surface is considered. Initially, the surface diffusion is the only physical mechanism assumed. The surface diffusion is driven by surface-curvature gradients, while a fixed surface slope and zero atomic flux are assumed at the groove root. The corresponding mathematical system is an initial boundary value problem for a two-dimensional equation of Hamilton-Jacobi type. The results obtained are in good agreement with both Mullins analytical "small-slope" solution of the linearized problem (W. W. Mullins, 1957, J. Appl. Phys. 28, 333) (for the case of an isolated grain boundary) and with the solution for a periodic array of grain boundaries (S. A. Hackney, 1988, Scripta Metall. 22, 1731). Incorporation of an electric field changes the problem to one of electromigration. Preliminary results of electromigration drift velocity simulations in copper lines are presented and discussed.